Next: Adding a New Up: The SNO Database: SNODB Previous: Standard Update Propagation

SNODB User Interfaces

This is a list of tools for use by local database maintainers, calibrators, shifters, and the average user. While low level HEPDB routines are of course available (see the HEPDB User Manual[2] for details), we strongly recommend against using them without great care. Generally speaking, we would prefer to make a new tool at users' requests rather than have people crashing around in the database with their own HEPDB-based code.

Here are the main tools:

  1. sdb_compare: Allows one to compare the contents of two banks or a bank and a titles file. Fuller documentation in preparation.

  2. process_updates (called via snodb.perl -process_updates): Processes updates waiting in the local todo/ directory by starting the server, waiting for the updates to be placed in the local official database, and finally stopping the server. Also automatically creates a snapshot of the local copy of the database and emails it to the czar, enabling the czar to insure that the local database is in step with the master database.

  3. sdb_input_titles (called via snodb.perl -input_titles): Prompts user for either the name of a titles file or the name of a file containing a list of titles files. A check is performed to see what databases the user is allowed to write to. Then the information is fed to /$SNODB_VER/exes/sdb_input_titles.

    A description of the CERN titles format is given in Appendix D.

    You may also use /$SNODB_VER/exes/sdb_input_titles directly to input titles files, but that will not do checking of write permissions. The following input switches may be provided on the command line:

  4. sdb_output_titles (called via /$SNODB_VER/exes/sdb_output_titles): Accepts as input the alias of a bank and an instant of validity and outputs a titles bank containing the requested bank.

  5. snapshot (called via snodb.perl -snapshot): Creates a snapshot of the database pointed to by $CDSERV/hepdb.names. The snapshot consists of two snapshot files containing ``full'' and ``brief'' outputs. The ``full'' output contains, for each insertion of each bank in the database, the bank name, number, serial number, insertion time and validity range. The ``brief'' output omits the insertion time (useful because the insertion time will change from node to node, so by omitting it the resulting file can be compared directly node-to-node).

  6. sncreate (called via snodb.perl -sncreate): Creates database files based on the contents of the hepdb.names file. If a filename found in hepdb.names already exists in the official database directory, it is not created.

  7. sndirs (called via snodb.perl -sndirs): Creates the database files' internal structure one internal directory at a time based on command line arguments, or for mulitiple directories residing in multiple files according to the contents of a file, e.g.,
    /$SNODB_VER/dbs_tools_f/sndirs.dat by using -l filename, -list filename, /list filename or /LIST filename. A sample sndirs.dat file, containing comments which explain what information is needed to create internal directories, is provided in Appendix C.

  8. snalia (called via snodb.perl -snalia): Creates the aliases for database banks on bank at a time based on command line arguments, or for mulitiple banks residing in multiple files according to the contents of a file, e.g.,
    /$SNODB_VER/dbs_tools_f/sndirs.dat, in the same manner as specified for sndirs above. A sample sndirs.dat file, containing comments which explain what information is needed to create bank aliases, is provided in Appendix C.

Here are some additional tools which will probably find less frequent usage. These tools are under development.

  1. obtaining a history of a given bank, i.e., insertion time, validity range, effective validity range, etc. Maybe just a nice printout of all the keys does the trick,

  2. obtaining a history of a given class of banks, i.e., calibration banks,

  3. obtaining deltas between two versions of a given bank,

  4. seeing pictorially the overall structure of the database, or for one file in the database,

  5. trimming a validity range, e.g., to change the upper validity range for a bank from infinity to a finite value,

  6. determining which banks have changed since the last time a given analysis was performed, and to obtain a printout of the affected time intervals,

  7. a subroutine which could be called repeatedly and which, on each call, returned the keys of the next bank in the database. This subroutine could also accept a bank name or perhaps a 2-character database abbreviation with which to limit the looping.




Next: Adding a New Up: The SNO Database: SNODB Previous: Standard Update Propagation


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