Relational database for ATLAS Detector Description primary numbers
In July 2004 we started to put primary numbers for ATLAS DD into
CERN Oracle database server. For this purpose we developed a special
database schema and also tools for data retrieval within ATHENA
applications. Using only SQL scripts for schema and data management,
we have put in the new database quite big amount of primary numbers for
all ATLAS subsystems, which are currently used by GeoModel based
applications to build various layouts of ATLAS geometry.
Putting data into database, manipulating versions
There are two different ways for data manipulation
in the ATLAS Geometry DB:
- SQL scripts. This is the most powerful way to work with SQL-enabled
databases, since it gives you the whole control on the data and
database schema. The main drawback of this approach is that it requires
from user some knowledge of SQL.
SQL scripts can be executed on LXPLUS using SQLPLUS command line utilite.
The quickest way to start SQLPLUS and connect directly to CERN Oracle PDB01
(Production Database server) with
username 'atlasdd_reader' is to source shell script ~tsulaia/public/start_sqlplus.sh.
When you are asked for password you should type 'reader'. As one can guess from the name, the
user 'atlasdd_reader' has readonly access to ATLAS DD primary number tables which
reside to 'atlasdd' schema.
The SQLPLUS utility is used by ATLAS subsystem experts to put new primary numbers
to the data tables. For this purpose the special Writer account is used.
-
PHP enabled web server. The php-enabled
web site
provides dual functionality: 1. Database browsing; 2. Various manipulations with HVS nodes including:
node and tag creation, tag collection and locking etc.
In the HowTo 1 and 2 we explain how to manipulate the data in the ATLAS Geometry DB using SQL
commands and web tool.
HowTo 1. Create new data table. Create initial version for it.
HowTo 2. Create new version for existing data table.
Reading data from database within ATHENA applications
To access versioned data for ATLAS Detector Description
applications, we have developed ATHENA service RDBAccessSvc,
based on POOL Relational Access abstraction layer.
The functionalities of this service include:
- Mechanism for database connection;
- Classes for uniform access of versioned data in relational database;
Here we provide general description of RDBAccessSvc member classes. Please note
that users can communicate to all these object through abstract interfaces only.
- RDBAccessSvc. This athena service manages database connection.
The connection parameters (hostname, user, password etc.) can be passed to the
service through jobOption scripts. The default database for RDBAccessSvc is PDB01
and default user - atlasdd_reader.
- RDBRecordset. The instances of this object can be considered as snapshots of data tables
on client application side. The records of database tables are represented by RDBRecord
objects, that sre kept within RDBRecordset object and can be accessed by index
or by iterator. The configuration of RDBRecordset object includes the indication of
data table name (node name), node tag, and if the tag of some parent node is provided then
the name of this parent should be indicated as well. RDBRecordset objects are created and managed
by RDBAccessSvc.
- RDBRecord. The objects of this class represent one single record within RDBRecordset
object. The values of its fields can be retrieved by field name or field name and index
in the case of arrays. RDBRecords are created and managed by RBDRecordset objects.
In the following HoTo 3 we provide some instructions for the use of
RDBAccessSvc package.
Thank you for your feedback sent to Vakho Tsulaia and
Joe Boudreau.