next up previous contents index
Next: Monitoring Up: DAQ Software Previous: daq_ctrl Process   Contents   Index


Database

The online system also uses MySQL [7] database for storing time history of the data taking conditions, ambient data, and configuration parameters of hardware and software. MySQL is distributed with a very rich cast of support utilities. The most frequently used one is mysql which can be invoked by the following command on database machine (eg, oka02):
 mysql/mysql/bin/mysql
This utility creates a direct connection to the database server and lets you enter queries directly from a command line prompt. Statements can continue over multiple lines and a semicolon can be used to end a statement.

At the time of writing there are four MySQL databases: mysql - for administration, test - for tests, Beam_4a, and DAQ - the main DAQ database. User can get the list of existing databases with

> SHOW DATABASES;

To select the DAQ database:

> USE DAQ;

The command

> SHOW TABLES;
displays existing tables: Runs, Recording, and others.

> SELECT ... FROM ... WHERE ...;



Alexander V.Inyakin 2002-04-05