Definition of the Database
The database and initial tables are created by the bootstrapOME.pl file from the ./src/SQL directory. This script reads in database configuration information from two sources: the 0x0*.sql files in that same directory, and the *.ome files in the ./src/xml directory.
The 0x0*.sql files in the sql directory define base
tables. 000-DataTypes.sql and 000-OMECore.sql define tables
that are at the core of the OME data model. 010-Analysis.sql
defines the structures needed for management of image analysis
modules, chains, and links (see
below). 020-ImageAttributes.sql is obsolete and has been
replaced by XML files, as has most of
030-FeatureAttributes.sql (except for the definitions of the
FEATURES
table). 050-AnalysisTests.sql is
also obsolete.
Editor's note As of OME 2.2,
the CREATE TABLE
statements used to generate the
core tables are no longer hand-coded in *.sql files.
Instead, the SQL is automatically generated from the Perl
classes used to read those tables. Please see the appropriate section of the
Perl API for more details.
The *.ome files in ./src/xml contain definitions of semantic types that populate the database and describe the data structure, along with other initialization code. Specifically:
- OMECoreTypes.ome contains definitions of the semantic types.
- featureExample.ome defines example analyses for finding features in cells.
- PlaneStatistics.ome defines semantic types and modules for calculating statistics on planes in images.
- StackStatistics.ome contains similar definitions for image stacks.
- ImportModules.ome is a dummy definition for a module that would import images.
- spotModules.ome defines semantic types and modules for finding spots.
The OME database is very "meta" — in addition to the actual data about images, projects, etc., the database contains numerous tables that describe the contents of the database. This might feel some somewhat confusing in its self-referentiality, but it's a powerful design. More on this below.
Hopefully, this document will help clear up some of the confusion. However, please keep in mind that this document will be out-of-date by the time you see it, so please refer to the code or other (hopefully automatically updated) documentation for details.