Database structure basics
Relational databases use a strict, well-defined hierarchy for data storage and retrieval.
Databases
The database is at the top level: it is a standalone entity encompassing all data that may be in connection to each other by any means.
Databases contain several data tables (e.g. Nuclide, Spectrum and Peaklist tables).
Data tables
Database tables consist of a header and data rows, and each row has exactly identical inner structure. Data rows are also called records in database terminology.
NUCLIDE_ID
A
Z
Symbol
...
...
...
...
51124
124
51
124Sb
51125
125
51
125Sb
52126
126
52
126Te
...
...
...
...
This figure contains a small part of the Nuclide table. Several data records are contained, and each row describes a unique Nuclide entity. Records may be queried, updated, inserted or deleted in a data table.
Data fields
A record comprises of several fields. All records in a table must have fields of identical name and data type. For example, a Nuclide record contains the following data fields:
Field name
Field value
Type of field value
NUCLIDE_ID
51124
integer
A
124
integer
Z
51
integer
Symbol
124Sb
string
The values of the data fields may be queried or updated individually in a record, if the record is identified by its primary key (see below), and the field is identified by its name.
Primary keys
Database management systems are required to retrieve, insert and delete records efficiently. To accomplish this task, each record must be unique, that is, must be identified unequivocally within a table. For identification purposes, one or more field values are used together, thus forming an identifier, or primary key.
For example, unique identifier of the nuclide table is a special field named NUCLIDE_ID. As it is declared unique, the database management system guarantees that duplicated NUCLIDE_ID will never be kept in the Nuclide table.
Please note that the A, Z field combination also would have been used as a primary key, but a single primary key was chosen because of its simpler usage.
 
 
Copyright © 1998-2007 by HyperLabs Software Budapest, Hungary