RadLex SQL Database

From MircWiki
Revision as of 03:23, 5 March 2007 by Johnpaulett (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

1 Database Structure

The Term Browser uses two tables:

1.1 radterms

Defines the relevant information about each term.

Error creating thumbnail: Unable to save thumbnail to destination


1.2 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.

Error creating thumbnail: Unable to save thumbnail to destination
  • 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 [1] 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).