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

DCS Detector Requirements Database

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

Responsibles

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

Current status: Merging code implementations. Partly functional system can be tested at: http://nuclear.gla.ac.uk/DCS/

Components

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

Structure

The implemented structure is one single database DCS_REQ, with eight tables:

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

Tables

There are at present 8 tables in the database:

mysql> CREATE TABLE Subgroups (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(16),
         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 Pv_names (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(32),
         description VARCHAR(60)
        );

mysql> CREATE TABLE Units (
         id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
         name VARCHAR(24),
         value VARCHAR(32),
         description TEXT(64);
        );

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,
         subgroup INT(3),
         pv_name INT(11),
         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)
       );

The 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

Administrative access (SSH to the server and to the DB itself) is restricted to the responsibles. Access to insert/update data into tables is restricted to registered users, with registration and authentication via the web interface.

Interface

We have a fully custom-written PHP interface and phpMyAdmin for DB administration. The user interface URL is: http://nuclear.gla.ac.uk/DCS/

Location

The DB and web interface will be physically located on a server in Glasgow for the initial design and testing period. Both DB and UI are very easy to transport to another server, in case a suitable server could be found at GSI.

Present location: http://nuclear.gla.ac.uk/DCS/

-- 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
code.tgztgz code.tgz manage 7.3 K 03 Apr 2008 - 14:37 DanProtopopescu Dan's UI implementation php code tarball (initial release)
dcs.tar.gzgz dcs.tar.gz manage 53.0 K 02 Apr 2008 - 15:37 DanProtopopescu Jarek's code tarball (first release)
Edit | Attach | Print version | History: r20 | r15 < r14 < r13 < r12 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r14 - 09 Apr 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)