Next: Networking and Database Up: The SNO Database: SNODB Previous: Introduction

Database Structure

The SNO database will be comprised of multiple files in multiple directories. In addition, each database file has an internal tree-like structure using a UNIX-based format for specifying directories and subdirectories. A multiple file database enables us to separate frequently-changed elements of the SNO database from those which are not, making the update procedure more robust and giving the database external as well as internal structure. Multiple files also give individual institutions more flexibility in the use of their available diskspace, since individual database files may reside on different disks, and make it possible to guard against erroneous data entries. The chief disadvantage of multiple files comes in the code which has to open all the database files at SNOMAN initialization time, and in the code which has to pick the particular file in which a particular object resides, but this is transparent to the average user and does not add significant processing time overhead.

Each database file will be internally organized into directories and subdirectories as specified by the creators of the data which reside therein. Database objects contained in these subdirectories are comprised of a ``keys'' bank and an attached data bank. This is illustrated in Fig. 2.

The data contained in the keys banks which are pertinent here are:

  1. a temporal validity range (GMT must be used),
  2. an insertion time (automatically added by HEPDB when the object is written), and
  3. several ``user'' keys.
For SNODB v3_06_05, these user keys include the following pieces of information: This information is stored in several arrays in the SNODB code, as illustrated in Table 2.

To read a bank from the database one must provide an instant of validity (most commonly, an event's time stamp) along with the bank alias and some number of additional keys. Using these items of information, HEPDB will then search for the most recently added database object-in this example a bank-which satisfies all the criteria. HEPDB can be forced to read an older version of a given object if one specifies the appropriate upper limit on the insertion time.

To write a bank, the same information is required except that a validity range must be provided instead of an instant of validity. The validity range provides the start and end times for which the information written to the database is considered valid. Greenwich Mean Time (GMT) is the standard time frame for SNO and SNODB.

There are several ways in which to read and write to the database using the tools described in Section 8. Information is passed to and from these routines by means of the ipath vector shown in Table 2.

The initial database structure is given in Appendix C. This structure reflects the fact that certain ``constants'' can change frequently with time, e.g., PMT calibration constants, while other constants rarely if ever change, e.g., geometry constants. Such a structure is naturally implemented with separate files. The current database structure is given in the file /3_06_05/dbs_tools_f/sndirs.dat which is reproduced the aforementioned Appendix. In this file, individual database files are given as *.dbs, followed by the internal HEPDB subdirectory and bank names.



Next: Networking and Database Up: The SNO Database: SNODB Previous: Introduction


cdsno@higgs.hep.upenn.edu
Mon Aug 10 17:56:28 EDT 1998