AIDA NTuple with SQL backend

Based on FreeHEP

Version 1.2.0.0 (09/Nov/2010 at 11:11:32 CET)


Overview

SQLTuple extends FreeHEP implementation of ITuple AIDA interface so that ITuples can be stored in an SQL database. It supports any relational DB backend via JDBC standard interface. Configuration is provided for MySQL, PostgreSQL, Derby, Oracle and C-JDBC, other databases can be used at least in read mode when their JDBC library is provided. All AIDA operations (projections, filters, evaluators,... ) are supported in a standard way. Some new functions have been included on top of standard AIDA Interface.

SQLTuple can be used in any AIDA-complient tool.

Types mapping:

On default, SQLTuple (on MySQL) uses type mapping compatible with AIDA mapping. Mapping rules different from standard JDBC ones are specified in the Types.properties file. Most of other numeric types are supported for reading, they are mapped to AIDA types as appropriate. MySQL boolean, byte, char and short are all read as short because their proper type can't be extracted from MySQL Schema.

Advantages over alternative Tools:

Added Values for Pool:

Added Values for AIDA:

Multilanguage support:


Documentation

AIDA Persistency Architecture

Concerning persistency mechanism, there are two kinds of AIDA objects:
  • Objects, which need direct access to the persistency service only for their IO operations (read/write/update/...): IHistograms, IClouds, IProfiles, ... All Persistency requirements for those objects can be implemented by standard persistency techniques based on reflective Transient-Persistent Separation (JDO, Hibernate, Serialisation,...)
  • Objects, which need direct access to the persistency service for some of their standard operations: ITuples. It is not feasible to completely separate Transient and Persistent form of those objects. Their Persistency should be tightly interfaced with their transient form. One possibility (chosen here for SQL-based persistency) is to implement an ITuple extension for each persistency mechanism.

SQLTuple Domain Decomposition and Dependencies

  • SQLTuple implements AIDA interface as an extension of the FreeHEP JAIDA implementation. It contains several extensions (Inspector, Plotter) using AIDA to perform global operations on NTuples (not only SQLTuples). All the functionality is available using standard AIDA interfaces and WebService access.

FreeHEP AIDA Data Store Technologies

AIDA NTuples can be stored using many different storage technologies (Compressed XML files, Root files, HBook files, several SQL databases). Operations between technologies (filterring, merging,...) are possible via standard AIDA channels. Within SQL technology, native SQL channels are used to speed up operations.

SQLTupleFactory Design:

Documentations:

Ant Build files build.xml manages building and testing SQLTuple.

Configuration files (they are searched in the CLASSPATH):

The package distribution is available here. JAS3 Plugin is available here. Java 1.5+ is required to run. Ant 1.6.5+ is required to build.


HowTos

Access to SQL database is specified via following properties (supplied via ITreeFactory.create(...) factory):

HowToRun in JAS3

HowToRun

# Untar full distribution
tar zxvf SQLTuple-dist.tar.gz

# Go to steering directory
cd SQLTuple/ant

# Setup Java (1.5+) and Ant (1.5+)
# If you are on CERN afs, you can do:
. /afs/cern.ch/user/h/hrivnac/public/Ant/setup-CERN.sh

# Build
ant jar

# Local Test
# Tests are performed on an embedded Derby database
# Example logfile
ant lcheck

# Remote Test
# Tests are performed on MySQL and PostgreSQL servers
# MySQL and PostgreSQL databases "Tuples" should exist on localhost
#   and be accessible for user test with password test
# Example logfile
ant rcheck

# Full Test
# Runs both Local and Remote Tests
ant check

# Build documentation
ant doc

# Build full distribution
ant dist

# Ask for generic Ant help
ant -h[elp]

# Ask for SQLTuple Ant help
ant -p[rojecthelp]

Interactive commands:

Usage: java -jar SQLTupleInspector.exe.jar [-options]

options:
  -help                  show command line args
  -connections           show known logical connections
  -logical               use logical connection from database (user and password are then not needed)
  -tuples <url>          show list of ntuples in a database specified as jdbc:<technology>://<database> or <logical connection>
  -columns <url>         show list of columns in a table specified as jdbc:<technology>://<database>/<table> or <logical connection>/<table>
  -rows <url>            show list of rows in a table specified as jdbc:<technology>://<database>/<table> or <logical connection>/<table>
  -user <user>           user
  -password <password>   password

Usage: java -jar SQLTuplePlotter.exe.jar [-options] <url>

parameters:
  <url>   jdbc:<technology>://<database>/<table> or <logical connection>/<table>

options:
  -help                  show command line args
  -connections           show known logical connections
  -logical               use logical connection from database (user and password are then not needed)
  -x <x>                 x axis formula
  -y <y>                 y axis formula (optional)
  -weight <weight>       weight formula (optional)
  -filter <filter>       filter formula (optional)
  -user <user>           user
  -password <password>   password (optional)
  -xmin <xmin>           x min (optional, speeds up creation of histograns from big ntuples)
  -xmax <xmax>           x max (optional, speeds up creation of histograns from big ntuples)
  -ymin <ymin>           y min (optional, speeds up creation of histograns from big ntuples)
  -ymax <ymax>           y max (optional, speeds up creation of histograns from big ntuples)

API Examples:

Notes:


Bugs/ToDos/Requests

Bugs:

ToDos:

Requests:

Requests to AIDA and FreeHEP:


Release History


Related Documentation and Presentations

Related Documentation:



SQLTuple has not been developed by LCG.
J.Hrivnac, 09/Nov/2010 at 11:11:32 CET