fairdb virtual database
play

FairDB Virtual Database Denis Bertini GSI - Scientific Computing - PowerPoint PPT Presentation

FairDB Virtual Database Denis Bertini GSI - Scientific Computing November 19, 2014 Outline FairDB 1 Design Supported Databases FairRoot Integration Features 2 Connectivity Versioning SQL I/O Parameter Class Error Handling R3B-Califa


  1. FairDB Virtual Database Denis Bertini GSI - Scientific Computing November 19, 2014

  2. Outline FairDB 1 Design Supported Databases FairRoot Integration Features 2 Connectivity Versioning SQL I/O Parameter Class Error Handling R3B-Califa Example 3 ROOT-TGeo to SQL-DB conversion User Manual (PDF) 4 Summary 5 Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 2 / 29

  3. FairDB Problem Statement Which Database? Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 3 / 29

  4. FairDB Design FairDB Design Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 4 / 29

  5. FairDB SQL Databases supported FairDB Supported Databases Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 5 / 29

  6. FairDB FairRoot Integration FairDB within FairRoot Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 6 / 29

  7. Connectivity Concepts Connectivity Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 7 / 29

  8. Connectivity Configuration Configuration JDBC style: defines a list of DB URLs, a user name and a password Configuration via environment variables of type FAIRDB TSQL * Configuration example: mysql: //localhost/r3b; export FAIRDB TSQL URL= " pgsql: //localhost:5432/R3B; sqlite: //test.sqlite" export FAIRDB TSQL USER= "usr mysql;usr postgres;usr sqlite" export FAIRDB TSQL PSWD= "passwd1;passwd2;passwd3"; Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 8 / 29

  9. Connectivity Multiple Connections Multiple Connections Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 9 / 29

  10. Version Management Concepts Concepts Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 10 / 29

  11. Version Management Metadata Auxiliary Table Version Management Query process: Condition ( timestamp, detector, version ) as primary key 1 Condition converted to a unique seq id 2 seq id used as key to access all relevant rows in the data table 3 User get access to all fetched rows 4 Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 11 / 29

  12. SQL I/O I/O Components I/O Components Data Organization Condition: event date, time, version, detector Interval: a condition extended to a time window ObjToTableMap: Object mapped to single row in a table Single or Composite: (a set of ObjToTableMap: sharing a Interval) I/O process Write by Interval of Validity (IoV) Use case: do calibrate channel in crate , estimate interval of validity which it remains valid and store in the DB Read using a Condition Use case: given a condition, get all calibration constants for every channel in every crate. Caching mechanism: cache owns query results for reuse, caller just gets const pointer. Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 12 / 29

  13. SQL I/O Templated SQL I/O Templated SQL I/O Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 13 / 29

  14. Parameter Class FairParSet Redesigned FairParSet Redesigned Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 14 / 29

  15. Parameter Class SQL-Aware Parameter Class SQL-Aware Parameter Class Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 15 / 29

  16. Parameter Class Data Types Data Types Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 16 / 29

  17. Error Handling Connection Info Connection Info Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 17 / 29

  18. Error Handling SQL Info SQL Info Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 18 / 29

  19. Error Handling RollBack Rollback Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 19 / 29

  20. Getting Started Availability Availability External packages March 2014 Root with DB plugins New PostGreSQL Driver ROOT v5-34-15 or higher. https://subversion.gsi.de/fairroot/fairsoft/ trunk / Use the git version of FairRoot base git clone https://github.com/FairRootGroup/FairRoot Example directory containing the FairDB tutorial5 adapt the FairDB config script dbconfig.sh Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 20 / 29

  21. Getting Started Parameter Example FairDbTutPar Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 21 / 29

  22. Getting Started Writing Macro sql param write.C Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 22 / 29

  23. Getting Started Relational Model Data and Metadata Tables Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 23 / 29

  24. Getting Started Reading Macro sql param read.C Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 24 / 29

  25. R3B Database ROOT to DB conversion Example: ROOT (TGeo) to DB automatic conversion Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 25 / 29

  26. R3B Database Crystal Nodes Tables Crystal Nodes Tables Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 26 / 29

  27. Documentation User Manual User Manual Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 27 / 29

  28. Documentation Contents Contents Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 28 / 29

  29. Summary Summary FairDB implements a uniform access to any SQL database It does not fix the DBMS technology Independent of the FairRoot framework Supports PostgreSQL, MySQL, SQLite, Oracle User Manual (available in PDF format) Ongoing work Implementing Realistic tests R3B DB projects : Califa-NeuLand, Epics, LandO2 to R3BRoot Online Database concept Multi-level and ditributed Caching mechanism (NoSQL based) Using MQ Methods SQL-RDBMS used as archiving engine Denis Bertini (Scientific Computing) ICC/SPIRAL2 Computing Meeting November 19, 2014 29 / 29

Recommend


More recommend