1 / 23

Nomad Object Model: Implementation in Oracle 9i

Nomad Object Model: Implementation in Oracle 9i. David Rodríguez IFCA (Santander) CERN IT-DB. Agenda. Introduction Mapping Model Schema summary Data loading Conclusions. Introduction. Task done with Dirk Düllmann and Dirk Geppert. NOMAD (WA96) experiment: Completed 1998.

adanne
Download Presentation

Nomad Object Model: Implementation in Oracle 9i

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Nomad Object Model: Implementation in Oracle 9i David Rodríguez IFCA (Santander) CERN IT-DB HEP Database Project Workshop

  2. Agenda • Introduction • Mapping • Model • Schema summary • Data loading • Conclusions HEP Database Project Workshop

  3. Introduction • Task done with Dirk Düllmann and Dirk Geppert. • NOMAD (WA96) experiment: • Completed 1998. • Search for neutrino oscillations. • Data in ZEBRA banks is read by an OO application. • Oracle 9i database: • OTT. • OCCI. HEP Database Project Workshop

  4. Goal • To elaborate an Object Model in Oracle 9i for testing: • This model had to be a bigger, more complicated one than the ones used for specifical tests. • Maps the objects of the application that reads the data from the ZEBRA files. • Use of development environment (Peter Kunszt). • Use of object extensions of the database drove the model design. • Other testing fields like partitioning also influenced it. HEP Database Project Workshop

  5. Data • Source: ZEBRA banks with DST and Raw data. • Object oriented (C++) interface to access the data with some FORTRAN functions. • Target: Oracle 9i DataBase. • Stored in object tables. • Navigation through references in the Database. HEP Database Project Workshop

  6. OO in Oracle 9i • In the database (object extensions): • Object types. • Object tables. • Collections: • VARRAYS. • Nested tables. • Inheritance. • Client side: • OTT: generates C++ classes. • OCCI: C++ binding. Two interfaces: associative and navigational. HEP Database Project Workshop

  7. Agenda • Introduction • Mapping • Model • Schema summary • Data loading • Conclusions HEP Database Project Workshop

  8. Mapping • Create an object relational model in the database. • With OTT C++ classes are generated for each object type in the DB schema. • OCCI & generated classes to access the database: • Data loading/manipulation. • Querying/Reading. HEP Database Project Workshop

  9. Object Relational Features • Use of object tables make mapping easier than when you use a pure relational schema. • Used the following: • User defined types (objects) <> Scalar types. • Object tables <> pure relational tables. • Inheritance (only single is possible) <> relations (f.k.). • Embedded objects (not referenceable) <> scalar types. • Collections (VARRAYS) <> multiple tables + relations. • Object references <> relations. HEP Database Project Workshop

  10. Drawbacks • Only row-objects (the ones in an object table) have an object ID, and thus could be referenced by other. • Embedded objects can’t. • Nor objects in a collection. • Objects extensions show problems to being used from some Oracle tools. For example multilevel collections with direct path load (SQL*Loader). • Object References make complicated mapping the object relational model to a relational one. For example to use external tables (that don’t admit objects). HEP Database Project Workshop

  11. Agenda • Introduction • Mapping • Model • Schema summary • Data loading • Conclusions HEP Database Project Workshop

  12. Model design • Navigational access to objects in the database. • An entry point to all the data (Raw and DST). • Testing of several features: • Multilevel collections (VARRAYS). • Object REFs in the database. • Different ways of storing Raw (big chunks of read-only numerical) data. • Embedded objects. • Partitioning (other task). HEP Database Project Workshop

  13. HEP Database Project Workshop

  14. Agenda • Introduction • Mapping • Model • Schema summary • Data loading • Conclusions HEP Database Project Workshop

  15. Schema summary I • Five object tables. • 16 object types. • 5 VARRAY types (no nested tables): • Two of Numbers. • Two of REFs. • One of Objects. • Navigational access to data through references in pEvent objects (entry point), and then in the DST/AOD. HEP Database Project Workshop

  16. Schema summary II • Two raw implementations: • VARRAY, table pRawd_T. • BLOB, table pRawLob_T. • DST (AOD): We have two object tables: • Auxiliary table for DST object grouping (pAOD_T). • Table with actual DST Objects (pDstObj_T). It is actually filled with subtypes of pDstObj. HEP Database Project Workshop

  17. More on AOD/DST • One pAOD object per event. This object has an array of references to the pDstObj objects of the event you can navigate to. • pDstObject subtypes: Dst, Evs, Rvxs and VArrayMas. • Heavy use of references in this part of the model. • Quite a lot of embedded objects too. HEP Database Project Workshop

  18. HEP Database Project Workshop

  19. Agenda • Introduction • Mapping • Model • Schema summary • Data loading • Conclusions HEP Database Project Workshop

  20. Data Loading • hepLoader program. Loads data from ZEBRA banks into the database. • Data source: several ZEBRA files. • Funcionality: • Event filtering based on online_event_type. • Selection of type of Raw to fill (BLOB/VARRAY). • Change of run number [–R] (Stefano). • Setting the number of events to load [–n] (Stefano). HEP Database Project Workshop

  21. Data Loading Problems • Memory leak. • Bigger if trying to load data that is already in the database. • Some problems loading a lot of raw data in BLOB format (workaround). • Some reading problems also with BLOB. HEP Database Project Workshop

  22. Agenda • Introduction • Mapping • Model • Schema summary • Data loading • Conclusions HEP Database Project Workshop

  23. Conclusions • We elaborated an object model in Oracle 9i and C++. • Implementation of part of the Nomad experiment data model. • Used real data from experiment. • Some problems still in data loading. • Also objects in the DB are not accepted by some Oracle tools. • Only row-objects can be referenced by others. HEP Database Project Workshop

More Related