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:
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.