RadLex SQL Database
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:
Defines the relevant information about each term.
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.
- 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  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).