Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Protege 3.3.1 DB Schema

Tania Tudorache tudorache at stanford.edu
Thu Mar 5 17:47:12 PST 2009


Dennis,

Documentation about the database format used by the Protege backend is here:

http://protege.stanford.edu/doc/design/jdbc_backend.html

This page has been written a long time ago, and now the backend uses for 
the frame, slot and facet column the full name of the entity rather than 
an integer.

I do not recommend that you do anything at the database level. Rather, 
you can implement a export plugin using the Protege API to whatever 
format you need. Other option is to export the entire content of the 
ontology using the QueryTab to a CSV file and postprocess that.

Another thing is that you should not use the JDBC ODBC bridge. It has 
very bad performance. Instead you should copy the database driver in the 
protege installation directory and use directly that driver. We have 
detailed instructions here:

http://protegewiki.stanford.edu/index.php/PrF_UG_files_database_backend

Tania



O'neill, Dennis wrote:
>
> Jennifer,
>
> I have been able to successfully create a Protégé DB version with MS 
> Access running on my local machine; but when I try to write to a SQL 
> Server DB running on another machine, things seem to get lost in the 
> woods. It may have to do with the driver I am specifying, but not 
> being a ODBC expert (or even novice) I could use a bit of help. Here 
> is what the ODBC Admin Tool has to say about the setup
>
> I then try to configure in Protégé as follows:
>
> It appears to connect to the DB OK (subsequent runs say the Table 
> ProtegeOrg already exists), it reports a certain number of frames are 
> to be written (about 4600 in this case), it begins sending INFO 
> messages for every 1000 it writes out, but then it bombs out with a 
> stack trace as follows:
>
> INFO: Getting 4368 frames, please be patient, Fri Feb 27 10:25:40 CST 2009
>
> INFO: 1000/4368, Fri Feb 27 10:25:55 CST 2009, delta=14, 
> mem(f/t/m)=66818/99352/497418
>
> INFO: 2000/4368, Fri Feb 27 10:26:12 CST 2009, delta=16, 
> mem(f/t/m)=66878/99352/497418
>
> INFO: 3000/4368, Fri Feb 27 10:26:32 CST 2009, delta=20, 
> mem(f/t/m)=66922/99352/497418
>
> INFO: 4000/4368, Fri Feb 27 10:26:51 CST 2009, delta=18, 
> mem(f/t/m)=71571/99352/497418
>
> INFO: java.sql.SQLException: [Microsoft][ODBC SQL Server 
> Driver]Invalid Descriptor Index
>
> at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
>
> at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
>
> at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3908)
>
> at 
> sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5699)
>
> at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:353)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseUtils.getShortValue(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.getShortValue(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.getFrameValuesSQL(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.getFrameValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.loadFrameIntoCache(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.getValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.getValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.getValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.ClosureCachingBasicFrameStore.getValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.SimpleFrameStore.getValue(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.SimpleFrameStore.getDirectOwnSlotValue(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.SimpleFrameStore.getFrameName(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.ModificationFrameStore.getFrameName(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.ModificationFrameStore.getFrameName(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.ArgumentCheckingFrameStore.getFrameName(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.ModificationFrameStore.getFrameName(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.getFrameName(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.getFrameName(Unknown 
> Source)
>
> at edu.stanford.smi.protege.model.DefaultKnowledgeBase.getName(Unknown 
> Source)
>
> at edu.stanford.smi.protege.model.DefaultFrame.getName(Unknown Source)
>
> at edu.stanford.smi.protege.model.DefaultCls.toString(Unknown Source)
>
> at java.lang.String.valueOf(String.java:2615)
>
> at java.util.AbstractCollection.toString(AbstractCollection.java:454)
>
> at java.lang.String.valueOf(String.java:2615)
>
> at java.lang.StringBuilder.append(StringBuilder.java:116)
>
> at edu.stanford.smi.protege.util.LazyTreeNode.toString(Unknown Source)
>
> at javax.swing.JTree.convertValueToText(JTree.java:1139)
>
> at 
> javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent(DefaultTreeCellRenderer.java:331)
>
> at 
> javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2693)
>
> at 
> javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
>
> at 
> javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
>
> at 
> javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:720)
>
> at 
> javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
>
> at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:400)
>
> at 
> javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3388)
>
> at 
> java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
>
> at 
> java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
>
> at java.awt.Component.firePropertyChange(Component.java:7192)
>
> at javax.swing.JTree.setModel(JTree.java:710)
>
> at javax.swing.JTree.<init>(JTree.java:511)
>
> at edu.stanford.smi.protege.util.SelectableTree.<init>(Unknown Source)
>
> at 
> edu.stanford.smi.protege.util.ComponentFactory.createSelectableTree(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.ui.SubclassPane.createSelectableTree(Unknown 
> Source)
>
> at edu.stanford.smi.protege.ui.SubclassPane.<init>(Unknown Source)
>
> at edu.stanford.smi.protege.ui.ClsesPanel.createSubclassPane(Unknown 
> Source)
>
> at edu.stanford.smi.protege.ui.ClsesPanel.createPanes(Unknown Source)
>
> at edu.stanford.smi.protege.ui.ClsesPanel.<init>(Unknown Source)
>
> at edu.stanford.smi.protege.widget.ClsesTab.createClsesPanel(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.widget.ClsesTab.createClsesSplitter(Unknown 
> Source)
>
> at edu.stanford.smi.protege.widget.ClsesTab.createMainSplitter(Unknown 
> Source)
>
> at edu.stanford.smi.protege.widget.ClsesTab.initialize(Unknown Source)
>
> at 
> edu.stanford.smi.protege.widget.WidgetUtilities.createTabWidget(Unknown 
> Source)
>
> at edu.stanford.smi.protege.ui.ProjectView.addTab(Unknown Source)
>
> at edu.stanford.smi.protege.ui.ProjectView.createTabbedPane(Unknown 
> Source)
>
> at edu.stanford.smi.protege.ui.ProjectView.<init>(Unknown Source)
>
> at 
> edu.stanford.smi.protege.ui.ProjectManager.displayCurrentProject(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.ui.ProjectManager.displayCurrentProject(Unknown 
> Source)
>
> at edu.stanford.smi.protege.ui.ProjectManager.loadProject(Unknown Source)
>
> at 
> edu.stanford.smi.protege.ui.ProjectManager.changeProjectStorageFormatRequest(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.action.ChangeProjectStorageFormat.actionPerformed(Unknown 
> Source)
>
> at 
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
>
> at 
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
>
> at 
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
>
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
>
> at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
>
> at 
> javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1051)
>
> at 
> javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1092)
>
> at java.awt.Component.processMouseEvent(Component.java:5517)
>
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
>
> at java.awt.Component.processEvent(Component.java:5282)
>
> at java.awt.Container.processEvent(Container.java:1966)
>
> at java.awt.Component.dispatchEventImpl(Component.java:3984)
>
> at java.awt.Container.dispatchEventImpl(Container.java:2024)
>
> at java.awt.Component.dispatchEvent(Component.java:3819)
>
> at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
>
> at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
>
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
>
> at java.awt.Container.dispatchEventImpl(Container.java:2010)
>
> at java.awt.Window.dispatchEventImpl(Window.java:1791)
>
> at java.awt.Component.dispatchEvent(Component.java:3819)
>
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
>
> at 
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
>
> at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
>
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
>
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
>
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
>
> WARNING: java.lang.RuntimeException: [Microsoft][ODBC SQL Server 
> Driver]Invalid Descriptor Index
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.createRuntimeException(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.getFrameValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.loadFrameIntoCache(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.getValues(Unknown 
> Source)
>
> It goes on with the “Invalid descriptor” error a total of 6 or 7 
> times. It then tries to redisplay the Java window and barfs with a 
> couple of
>
> -- WidgetUtilities.createTabWidget()
>
> INFO: java.sql.SQLException: [Microsoft][ODBC SQL Server 
> Driver]Connection is busy with results for another hstmt
>
> at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
>
> at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
>
> at sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:3150)
>
> at 
> sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:214)
>
> at 
> sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(JdbcOdbcPreparedStatement.java:89)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.executeQuery(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.getFrameValuesSQL(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.DatabaseFrameDb.getFrameValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.loadFrameIntoCache(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.getValues(Unknown 
> Source)
>
> at 
> edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.getValues(Unknown 
> Source)
>
> And draws a Protégé window that looks like
>
> When I go to exit, it asks if I want to save. If I say yes, it dies with
>
> Any suggestions?
>
> Dennis M. O'Neill
>
> SAIC
>
> Contractor to Marathon Oil Company
>
> Enterprise Content Management
>
> Room 2068D
>
> (281) 236-5690 (Cell)
>
> doneill at marathonoil.com
>
> -----Original Message-----
> From: protege-discussion-bounces at mailman.stanford.edu 
> [mailto:protege-discussion-bounces at mailman.stanford.edu] On Behalf Of 
> Jennifer Vendetti
> Sent: Monday, February 23, 2009 7:50 PM
> To: User support for Core Protege and the Protege-Frames editor
> Subject: Re: [protege-discussion] Protege 3.3.1 DB Schema
>
> Hello Dennis,
>
> O'neill, Dennis wrote:
>
> > However, the issue we are dealing with is that the one of the ontologies
>
> > I currently have is too large for MS SharePoint to process efficiently
>
> > as an XML import. For certain uses (SharePoint libraries), we only need
>
> > a subset, and hence want to filter the entries before XML export/import.
>
> >
>
> You might consider modularizing your ontology. There is a plug-in
>
> called "PROMPT" that can (among other things) assist you in extracting
>
> portions of your ontology:
>
> http://protegewiki.stanford.edu/index.php/PROMPT
>
> In Protege 3.3.1, the project inclusion mechanism was not supported for
>
> ontologies stored in Protege's database back-end, but this is now
>
> supported in Protege 3.4.
>
> > Having looked at the DB that is generated, I can see how it is really an
>
> > export of the Frame meta-database; but that is exactly the thing we want
>
> > to decipher. If I understood the format, perhaps I could post-process it
>
> > into a true ontology DB (tables for class instances, for example) that
>
> > we could then do our queries over.
>
> >
>
> Perhaps writing an export plug-in for this task would work:
>
> http://protege.stanford.edu/doc/pdk/plugins/export_plugin.html
>
> Jennifer
>
> _______________________________________________
>
> protege-discussion mailing list
>
> protege-discussion at lists.stanford.edu
>
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>   




More information about the protege-discussion mailing list