Difference between revisions of "RadLex SQL Database"

From MircWiki
Jump to navigation Jump to search
m
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
  
 
NOTE:  In order to start someplace, there is an entry "ROOT" in the radterms table that acts as the root term of the ontology.  This root term has no meaning outside of this database representation of the ontology.  The "ROOT" entry appears in the radlinks table to start the relations tree.
 
NOTE:  In order to start someplace, there is an entry "ROOT" in the radterms table that acts as the root term of the ontology.  This root term has no meaning outside of this database representation of the ontology.  The "ROOT" entry appears in the radlinks table to start the relations tree.
 
== Database Structure ==
 
The Term Browser uses two tables:
 
 
=== radterms ===
 
 
Defines the relevant information about each term.
 
 
[[Image:radterms.png]]
 
 
 
=== radlinks ===
 
 
Defines the relationships between terms.  Since the ontology is (or soon will be) highly interlinked, this table defines all the parent-child relations between terms.
 
 
[[Image:radlinks.png]]
 
 
* '''PID''' - the radlex_id of the parent term
 
* '''CID''' - the radlex_id of the child term
 
* '''relation_type''' - the type of relationship between the parent and the child, see [http://radlex.org/getRelationTypes] for a current list of relation types.
 
* '''preferred''' - boolean value indicating if the relationship is preferred (i.e. it is the natural relation for those terms, there may be other relationships between these two terms, but this relation is considered the primary by RadLex.  Preferred terms are the ones that are shown in the tree structure of the Protege ontology and the Term Browser).
 
 
 
[[Category: RadLex]]
 

Latest revision as of 18:48, 31 July 2009

The Term Browser uses a MySQL database to provide the data. When a new version of the RadLex ontology is available, the SQL Export plugin (RadLex Protege Plugin) is used to generate a file containing SQL commands to create the database and tables, and populate the tables with the latest terminology. This SQL file is then run on the MySQL database of the Term Browser. The SQL file is provided to all users to import into their own databases, if desired. The SQL file has only been tested on an MySQL database, however, the script should be applicable to any SQL based database with little or no modification.

NOTE: In order to start someplace, there is an entry "ROOT" in the radterms table that acts as the root term of the ontology. This root term has no meaning outside of this database representation of the ontology. The "ROOT" entry appears in the radlinks table to start the relations tree.