You are here: PANDA Wiki>DCS Web>DCSRequirementsDB (revision 9)EditAttach

DCS Detector Requirements Database

A MySQL implementation of a DCS detector requirements database is proposed here, as first proposed in Jarek's talk (attached).

Responsibles

Responsible for this implementation will be JaroslawSzewinski and DanProtopopescu. The system should be preferably fully functional by 15/04/2008.

Components

The MySQL database will be located on a Linux machine, running a PHP-enabled Apache server.

Structure

There are two options:
  • One single database with first column in each table denoting the corresponding subdetector
  • One database per subdetector (might be safer)
The first option has the advantage that is makes easier to obtain cumulated/cross-detector figures of the DCS requirements.

mysql> CREATE DATABASE DCS_REQ;
mysql> GRANT ALL ON DCS_REQ.* TO 'dsc_req_db_admin'@'localhost' IDENTIFIED BY '******';
mysql> FLUSH PRIVILEGES;

Tables

Tentatively, there could be 8 tables in the database:

mysql> CREATE TABLE Subdetectors (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(10),
         description TEXT(255),
         contact INT(3)
        );

mysql> CREATE TABLE Types (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(20),
         description TEXT(50);
        );

mysql> CREATE TABLE sValues (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(20)
        );

mysql> CREATE TABLE Units (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(5),
         value VARCHAR(20),
         description TEXT(50);
        );

In this table we could have items like unit, type referred by integer id and cross-query the above tables or direct, by the VARCHAR name. I would opt for the latter for better readability.

mysql> CREATE TABLE ProcessVariables (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         subdetector INT(3),
         PVname VARCHAR(32),
         unit INT(3),
         type INT(3),
         channels INT(5),
         nominal_value FLOAT,
         range_min FLOAT,
         range_max FLOAT,
         warn_min FLOAT,
         warn_max FLOAT,
         alarm_min FLOAT,
         alarm_max FLOAT,
         update_rate INT(6),
         is_monitored TINYINT,
         is_controlled TINYINT,
         gen_interlock TINYINT,
         description TEXT(255),
         contact INT(3),
         hardware VARCHAR(60),
         lastupdatedby VARCHAR(40),
         timestamp TIMESTAMP(8)
       );

Then some auxiliary tables:

mysql> CREATE TABLE Institutes (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(60),
         address VARCHAR(200),
         contact_name VARCHAR(60),
         contact_phone VARCHAR(20),
         contact_email VARCHAR(50)
        );

People table:

mysql> CREATE TABLE Contacts (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         firstname VARCHAR(60),
         lastname VARCHAR(30),
         email VARCHAR(60),
         phone VARCHAR(20),
         institute INT(3)
        );

mysql> CREATE TABLE Hardware (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         vendor VARCHAR(60),
         name VARCHAR(60),
         driver VARCHAR(60),
         platform CHAR(20),
         supported_by VARCHAR(60)
        );

Access restrictions

During design and implementation the access (SSH to the server and to the DB itself) will be restricted to the responsibles. Access to insert/update data into tables will be restricted to each detector group via the PHP input interface.

Interface

Custom written PHP interface and phpMyAdmin for DB administration. A simple demo was set up here: http://nuclear.gla.ac.uk/DCS/interactiveTable.php?name=ProcessVariables

Location

The DB will be physically located on a server at GSI after an initial design and testing period.

-- DanProtopopescu - 04 Mar 2008
Topic attachments
I Attachment Action Size Date Who Comment
JS18-080303_dcs_database.pdfpdf JS18-080303_dcs_database.pdf manage 48.3 K 04 Mar 2008 - 09:23 DanProtopopescu Jaroslaw Szewinski talk at GSI on 03/03/2008
Edit | Attach | Print version | History: r20 | r10 < r9 < r8 < r7 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r9 - 12 Mar 2008, DanProtopopescu
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding PANDA Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)