Evaluation of the C++ binding to the Oracle Database System Dirk Geppert and Krzysztof Nienartowicz, IT/DB CERN IT Fellow Seminar November 20, 2002.

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

Copyright  Oracle Corporation, All rights reserved. 2 Java and Databases: An Overview.
D. Düllmann - IT/DB LCG - POOL Project1 POOL Release Plan for 2003 Dirk Düllmann LCG Application Area Meeting, 5 th March 2003.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Introduction to SQL Programming Techniques.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Adaptive Database Application Modeling API Final Project Report SOURENA NASIRIAMINI CS 491 6/2/2005.
1 C. Shahabi Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California
ASP.NET Programming with C# and SQL Server First Edition
OOP Languages: Java vs C++
Dale Roberts 8/24/ Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
XML I/O in ROOT S. Linev, R. Brun, H.G. Essel CHEP 2004.
Programming Languages and Paradigms Object-Oriented Programming.
Status of SQL and XML I/O Sergey Linev, GSI, Darmstadt, Germany.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
Database Management Systems 1 Oracle Programming.
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
JA-SIG 12/4/20051 JMX For Monitoring and Maintenance JA-SIG - December 4, 2005 – Atlanta, GA Eric Dalquist Division of Information Technology University.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Connecting to Oracle using Java November 4, 2009 David Goldschmidt, Ph.D. David Goldschmidt, Ph.D.
SIMPLE PROBLEM SOLVING in Java: a Problem Set Framework Viera K. Proulx Richard Rasala Jason Jay Rodrigues CCSCNE 2002 Conference.
Technical Team WITSML SIG Dubai - November 2008 John Shields / Gary Masters.
Effective Test Driven Database Development Gojko Adzic
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Evaluation of the C++ binding to the Oracle Database System Performance Issues and Benchmarks Dirk Geppert and Krzysztof Nienartowicz, IT/DB CERN IT Fellow.
CHEP 2003 March 22-28, 2003 POOL Data Storage, Cache and Conversion Mechanism Motivation Data access Generic model Experience & Conclusions D.Düllmann,
Hibernate 3.0. What is Hibernate Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it.
An RTAG View of Event Collections, and Early Implementations David Malon ATLAS Database Group LHC Persistence Workshop 5 June 2002.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
ROOT I/O for SQL databases Sergey Linev, GSI, Germany.
Java Database Connectivity. Java and the database Database is used to store data. It is also known as persistent storage as the data is stored and can.
CERN/IT/DB Oracle C++ Call Interface Dirk Geppert IT/DB DB Workshop July 11-13, 2001.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Bernhard Düchting Principal Sales Consultant BU Database - Migration Oracle Germany.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday Frank Gaede, DESY -IT-
Some Ideas for a Revised Requirement List Dirk Duellmann.
Basics of JDBC Session 14.
LCG Distributed Databases Deployment – Kickoff Workshop Dec Database Lookup Service Kuba Zajączkowski Chi-Wei Wang.
Andrea Valassi (CERN IT-DB)CHEP 2004 Poster Session (Thursday, 30 September 2004) 1 HARP DATA AND SOFTWARE MIGRATION FROM TO ORACLE Authors: A.Valassi,
Overview of C/C++ DB APIs Dirk Düllmann, IT-ADC Database Workshop for LHC developers 27 January, 2005.
CINT & Reflex – The Future CINT’s Future Layout Reflex API Work In Progress: Use Reflex to store dictionary data Smaller memory footprint First step to.
Spring JDBC Dima Ionut Daniel. Contents What is Spring JDBC? Overview Spring JDBC Core SQL Exceptions Database Connection Batch Operations Handling BLOB/CLOB.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
25th Nov, 1999 LHCb Event Data Model Pavel Binko, LHCb / CERN 1 LHCb Software Week LHCb Event Data Model Pavel Binko LHCb / CERN.
G.Govi CERN/IT-DB 1GridPP7 June30 - July 2, 2003 Data Storage with the POOL persistency framework Motivation Strategy Storage model Storage operation Summary.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe.
Preface IIntroduction Course Objectives I-2 Course Content I-3 1Introduction to Oracle Reports Developer Objectives 1-2 Business Intelligence 1-3 Enterprise.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Database: JDBC Overview
Jean-Philippe Baud, IT-GD, CERN November 2007
DEPTT. OF COMP. SC & APPLICATIONS
ODBC, OCCI and JDBC overview
(on behalf of the POOL team)
Database JDBC Overview CS Programming Languages for Web Applications
Dirk Düllmann CERN Openlab storage workshop 17th March 2003
DUCKS – Distributed User-mode Chirp-Knowledgeable Server
OCCI Oracle C++ Call Interface
Data Model.
Java Database Connectivity
Chapter 8 Advanced SQL.
Presentation transcript:

Evaluation of the C++ binding to the Oracle Database System Dirk Geppert and Krzysztof Nienartowicz, IT/DB CERN IT Fellow Seminar November 20, 2002

Dirk GeppertIT Fellow Seminar, November 20, Outline Report on work performed during IT/DB fellowship in 2001 Part I: Dirk Functionality tests Part II: Krzysztof Benchmarks and Performance issues Presentations at HEP database project workshops Jan 2002 and Jul IT/DB Oracle tutorials OO database, C++ and Java, 20 Feb

Dirk GeppertIT Fellow Seminar, November 20, Outline Part I Motivation Short intro to OCCI & OTT OTT usage Object models Problems & Improvements Summary & Conclusions

Dirk GeppertIT Fellow Seminar, November 20, Motivation Functionality and flexibility for a persistent event store of HEP data provided (object models & access patterns)? Oracle database OCCI & OTT CERN member of Oracle OCCI beta test program Close contact to Oracle development Oracle Metalink Early releases, access to bug fixes betaApril June (patch set)December betaFebruary betaMarch May (patch set)October 2002

Dirk GeppertIT Fellow Seminar, November 20, Oracle C++ Call Interface: OCCI Oracle C++ Call Interface (API) C++ binding on top of C binding (wrapper): a ‘better OCI’ ANSI C++, STL JDBC like Features: Relational programming -Associative access to Relational Data -SQL DDL, DML, queries, PL/SQL Object programming -Associative & Navigational access to objects Advanced features: thread safety, connection pooling, complex object retrieval, metadata, client-side object cache, …

Dirk GeppertIT Fellow Seminar, November 20, MAPFILE fileCPPFILE fileHFILE file OCCI Source Compiler OCCI libraryLinkerObject fileExecutable OTT INTYPE file SQL DDL Database Server Type Definitions Object Type Translator: OTT

Dirk GeppertIT Fellow Seminar, November 20, OTT standard vs. alternative usage Do not touch x_C, extensions to user class Existing code has to be modified Run OTT once, post-process Customize streamer (readSQL, writeSQL): use transient data members No modifications to existing code, only to OTT generated classes Additional advantage: client memory space Vertex_C x,y,z Vertex PObject C++ Vertex_O x,y,z SQL Vertex_CVertex x,y,z PObject C++ User types (transient) already exist: no modifications wanted

Dirk GeppertIT Fellow Seminar, November 20, Object models Implementation of existing HEP data model Provide typical OM, but: keep it simple test OCCI/OTT functionality Choice: NOMAD RAW & DST Different RAW models (VArray, LOB) Subset of DST (showing all required functionality) Read data from ZEBRA Populate/read event data to/from OracleDB using OCCI successful

Dirk GeppertIT Fellow Seminar, November 20, NOMAD object model

Dirk GeppertIT Fellow Seminar, November 20, NOMAD event display Existing NOMAD DST event display Root GUI reading ZEBRA event store Store events in OracleDB, use OCCI for object retrieval Keep Root GUI OCCI demo for Oracle Open World 2001 in San Francisco

Dirk GeppertIT Fellow Seminar, November 20,

Dirk GeppertIT Fellow Seminar, November 20,

Dirk GeppertIT Fellow Seminar, November 20, Problems & Improvements Problems reported (as bug or enhancement request); some solved, some fixed in future Oracle (minor) releases SQL oNo abstract data types, wait for Oracle 10i OTT Member initialization oset & get inlined oPrivate-Protected members oForward declarations oreadSQL return type (inherited instead of base persistent type) post-process (with set of simple scripts)

Dirk GeppertIT Fellow Seminar, November 20, Problems & Improvements cont’d OCCI VARRAY, LOB and String data types Embedded objects: no destructor called Client side object cache Memory leaks Objects were created on heap, now ‘new with placement’ into cache; embedded objects still on heap Control for cache size oControl for garbage collection considerable progress, would like to extend functionality/API

Dirk GeppertIT Fellow Seminar, November 20, Summary & Conclusions OTT Flexibility & functionality not sufficient for HEP but: generated code can be used as template and easily extended/modified to fit needs OCCI Significant progress during IT/DB beta testing -From Oracle 9.0 to 9.2 (~ 1year) -Oracle contacts (e.g. development) very cooperative Required functionality for HEP persistency is available -Implemented object models are non-trivial -Associative access to relational -Navigational access to database objects Ready to use for e.g. ConditionsDB, LCG catalogs

Dirk GeppertIT Fellow Seminar, November 20, create type ARRAY_O as varray(1000) of number / create type A_O as OBJECT ( n number, a ARRAY_O, p REF A_O) / create table A_T of A_O; insert into A_T values (A_O(0,null,null)); type A_O generate A_C as A SQL  OTT  C++ A_C Number n Vector a Ref p A PObject SQLOTTOCCI

Dirk GeppertIT Fellow Seminar, November 20, Generated C++ classes class A_C : public oracle::occi::Pobject { private: // attributes … public: // set & get attributes … void *operator new(size_t size); void *operator new(size_t size, void *ctxOCCI_); void *operator new(size_t size, const oracle::occi::Connection * sess, const OCCI_STD_NAMESPACE::string& table); OCCI_STD_NAMESPACE::string getSQLTypeName() const; A_C(); A_C(void *ctxOCCI_) : oracle::occi::PObject (ctxOCCI_) { }; static void *readSQL(void *ctxOCCI_); virtual void readSQL(oracle::occi::AnyData& streamOCCI_); static void writeSQL(void *objOCCI_, void *ctxOCCI_); virtual void writeSQL(oracle::occi::AnyData& streamOCCI_);} Persistent Object transient persistent SQL

Dirk GeppertIT Fellow Seminar, November 20, Environment *env=Environment::createEnvironment(Environment::OBJECT); RegisterMappings(env); Connection *conn=env->createConnection(“scott”,”tiger”,””); Statement *stmt=conn->createStatement(); ResultSet *resultSet=stmt->executeQuery(“select REF(t) from a_T t where n=0”); if (ResultSet::DATA_AVAILABLE == resultSet->next()) { Ref ref=resultSet->getRef(1); } conn->commit(); stmt->closeResultSet(resultSet); conn->terminateConnection(conn); Environment::terminateEnvironment(env); Example Session create/modify/delete objects easy to use get a reference

Dirk GeppertIT Fellow Seminar, November 20, Ref ref=resultSet->getRef(1); ref_next=new(conn,”A_T”) A(); ref->setP(ref_next); // forward ref->markModified(); Typical usage Ref ref=resultSet->getRef(1); do { ref->dump(); A *ptr=ref.ptr(); // if needed } while (!((ref=ref->getP()).isNull())); dereference, pin reference pointer Example navigation persistent modify Creating new objects