The KLOE relational database | Table browser |
KLOE has two distinct databases:
a HEPDB database, also known as the offline database, since it is used to store the detector geometry and calibration data
a relational database, also known as the online and data handling database, since it contains the computing system catalog, the DAQ configuration parameters and the file bookkeeping data.
In this document, only the second database will be described.
The KLOE relational database is managed by the IBM DB2 Universal Database v5 which is a standard-compliant RDBMS. However, as most of the database management systems, it has its own extensions and its own limitations; for more information, have a look at:
The data in a relational database are organized in tables. Each table is an independent entity made up of a defined number of columns and a variable number of rows. A column is a set of values of the same data type. Each row contains an entry in the table. To access the data, users make queries on the tables. The rows are not necessarily ordered within a table, so if order is important, it must be specified in the query.
Since a DBMS normally manages a large amount of data, dumb linear search in a table is not feasible. For this reason, each table has normally one or more indexes. An index is a subset of columns that is maintained ordered at all times, allowing much faster accesses on tables when the search condition of a query contains the initial columns of the index. Special indexes can also be used to ensure uniqueness inside the table (considering only the index columns); the preffered unique index been called the primary key.
To minimize the redundancy of the data, a single piece of information can be split between several tables. To ensure that the pieces fit together, foreign keys are used. A foreign key is a link between the child and the parent table, preventing the deletion of a parent row needed by the child.
To access the whole information, a user has to join different tables (usually using the columns specified in the foreign key). Since this can be a bit tedious, views are often used to hide the complexity away from the user. A view is a logical view on the data; it does not contain any data by itself, but instead gets the data on-the-fly from other tables when needed. To be more precise, it is just a shorthand for a complex query.
Tables and views themselves are grouped in schemas. A schema is just a collection of tables and views used to provide a logical classification. Tables (and/or views) in different schemas are normally used for different purposes.
The KLOE relational database can be classified using two different approaches:
Based on the type of data:
|
Based on the access pattern:
|
A general purpose table browser is also available here.
None yet.
Please send questions to Igor Sfiligoi