Bernhard Düchting Principal Sales Consultant BU Database - Migration Oracle Germany.

Slides:



Advertisements
Similar presentations
Supporting Persistent Objects In Python Jeremy Hylton
Advertisements

Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Chapter 10: Designing Databases
Michael Pizzo Software Architect Data Programmability Microsoft Corporation.
Database Architectures and the Web
Copyright  Oracle Corporation, All rights reserved. 2 Java and Databases: An Overview.
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
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.
Object Oriented Databases - Overview
Introduction to PL/SQL Lecture 0 – Self Study Akhtar Ali.
C++ fundamentals.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Database Design and Introduction to SQL
Enterprise Object Framework. What is EOF? Enterprise Objects Framework is a set of tools and resources that help you create applications that work with.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
Oracle9 i JDeveloper for Database Developers and DBAs Brian Fry Principal Product Manager Oracle JDeveloper Oracle Corporation.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
1 Copyright © 2004, Oracle. All rights reserved. Introduction to Oracle Forms Developer and Oracle Forms Services.
Entity Beans BMP Celsina Bignoli
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
I Copyright © 2004, Oracle. All rights reserved. Introduction Copyright © 2004, Oracle. All rights reserved.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
CHEP 2003 March 22-28, 2003 POOL Data Storage, Cache and Conversion Mechanism Motivation Data access Generic model Experience & Conclusions D.Düllmann,
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
INNOV-10 Progress® Event Engine™ Technical Overview Prashant Thumma Principal Software Engineer.
What is a Package? A package is an Oracle object, which holds other objects within it. Objects commonly held within a package are procedures, functions,
OODBMS: Introduction and Logical Database Design
CERN/IT/DB Oracle C++ Call Interface Dirk Geppert IT/DB DB Workshop July 11-13, 2001.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Development of the CMS Databases and Interfaces for CMS Experiment: Current Status and Future Plans D.A Oleinik, A.Sh. Petrosyan, R.N.Semenov, I.A. Filozova,
Some Ideas for a Revised Requirement List Dirk Duellmann.
Object storage and object interoperability
Basics of JDBC Session 14.
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,
CERN/IT/DB DB US Visit Oracle Visit August 20 – [ plus related news ]
Overview of C/C++ DB APIs Dirk Düllmann, IT-ADC Database Workshop for LHC developers 27 January, 2005.
Spring JDBC Dima Ionut Daniel. Contents What is Spring JDBC? Overview Spring JDBC Core SQL Exceptions Database Connection Batch Operations Handling BLOB/CLOB.
CORAL CORAL a software system for vendor-neutral access to relational databases Ioannis Papadopoulos, Radoval Chytracek, Dirk Düllmann, Giacomo Govi, Yulia.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
G.Govi CERN/IT-DB 1GridPP7 June30 - July 2, 2003 Data Storage with the POOL persistency framework Motivation Strategy Storage model Storage operation Summary.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
European Organization For Nuclear Research CERN Accelerator Logging Service Overview Focus on Data Extraction for Offline Analysis Ronny Billen & Chris.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Evaluation of the C++ binding to the Oracle Database System Dirk Geppert and Krzysztof Nienartowicz, IT/DB CERN IT Fellow Seminar November 20, 2002.
Preface IIntroduction Course Objectives I-2 Oracle Complete Solution I-3 Course Agenda I-4 Tables Used in This Course I-5 The Order Entry Schema I-6 The.
Oracle Database Architectural Components
Introduction to Oracle Forms Developer and Oracle Forms Services
Jean-Philippe Baud, IT-GD, CERN November 2007
SQL Environment.
ODBC, OCCI and JDBC overview
Introduction to Oracle Forms Developer and Oracle Forms Services
Open Source distributed document DB for an enterprise
Introduction to Oracle Forms Developer and Oracle Forms Services
POOL persistency framework for LHC
Database Architectures and the Web
#01 Client/Server Computing
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Chapter 15: File System Internals
#01 Client/Server Computing
Presentation transcript:

Bernhard Düchting Principal Sales Consultant BU Database - Migration Oracle Germany

Migrating C++ Applications using OCCI

Agenda  Object Orientation and C++  Oracle C++ Call Interface - Overview  Objects Access  Summary  Case Study - Using OCCI at CERN  Q & A

Object Orientation with 9i  Native data types for collections  Definition of object types, object tables and object views  Explicit table inheritance using SQL-99  Implicit inheritance using references (REF)  Overloading of object methods  Online schema evolution

Object Orientation and C++  Header files with object definition generated from object schema  No need for separate object-relational mapping  Object cache with pre-fetch capability for transient and persistent object management  Server-side object locking

Steps for Migration  Determine object model and class hierarchy  Use JDeveloper 9i to map to Oracle object schema  Generate C++ header files using Oracle Type Translater (OTT)  Modify old C++ access classes as required to work with new object type definitions  Add functionality for transient and persistent object management as required

OCCI Partners and Customers  A major GIS cartridge partner – High performance object-relational and spatial data access for national surveying system  A global power transmission manufacturer – Handle complex object-retrieval for graphical maintenance console  A global medical systems manufacturer – Replace ODBMS to manage patient image data  A national postal authority – Replacing third-party persistency framework

Agenda  Object Orientation and C++  Oracle C++ Call Interface - Overview  Objects Access  Summary  Case Study - Using OCCI at CERN  Q & A

Oracle C++ Call Interface OCCI  Built on OCI – Similar control and performance of OCI  Based on Standards – ANSI/ISO C++ Standard, including STL – Associative access API design similar to JDBC  Performance – Prefetching, client-side cache, array operations, data buffering, thread safe  API easy to use – API design consistent with C++ programming paradigm (e.g. new operator overloaded for creating persistent objects)

OCCI Basics  Setup of Environment and Connection  Executing SQL Statement – SQL statement – Prepared SQL statement with bind variables – Stored procedure  Executing SQL Query – Return multiple rows into result set – Use prefetching for performance  Seamless support of Oracle datatypes – varchar2 mapped to string, – collection mapped to vector STL

OCCI Advanced Features  Connection Pooling – Improves scalability by multiplexing many logical connections over few physical connections – Optimal usage of physical connection resource – Connection pool shrinks and grows on demand  Thread Safety – OCCI handles mutexed access to shared resources  Array Operations – Insert/update multiple rows – Fetch multiple rows in one round-trip

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 atable 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); create/modify/delete objects Example Session

Agenda  Object Orientation and C++  Oracle C++ Call Interface - Overview  Objects Access  Summary  Case Study - Using OCCI at CERN  Q & A

OCCI Object Features  Transparent access of database objects as C++ instances  Navigation of objects as simple as de- referencing smart-pointers  Client-side caching of C++ objects  Supports all 9i object features including inheritance  Oracle Type Translator (OTT) – Maps object types to C++ interface classes

Client-side Object Cache  Memory Buffer for Objects – Transparent lookup and memory management support – Stores and tracks objects fetched from server to client side – Maintains references – Created when OCCI environment is initialized in object mode  Benefits – Reduces client/server round-trips – Object-level locking

Accessing Objects  Unique Object Identifier OID  Navigational Interface – No SQL – Navigate using object references (REF) – Create/access/lock/delete/flush/commit  Associative Interface – Use SQL or PL/SQL – Data buffers, no cost of transporting data to client

Representing Objects CREATE TYPE ADDRESS AS OBJECT ( state CHAR(2), zip CHAR(2));  OTT generates: class ADDRESS : public PObject { // OCCI pre-defined class protected : string state; string zip; public : void *operator new(size_t size); // create a transient instance void *operator new(size_t size, Connection *conn, string& table); // create a persistent instance }

Working with Objects I  Create new object – Use new operator – Transient or persistent objects  Fetch object from server – Pin object in cache using REF – Fetch object by value  Navigate to object – Use pinned object to traverse hierarchy – Only with referenceable objects

Working with Objects II  Modify object – Make changes in C++ application – Mark persistent object as dirty  Flush changes to server  Commit transaction – Includes flushing dirty objects

Oracle Object Cache REF Client side cache Server buffer cache Pin Network flush load

Agenda  Object Orientation and C++  Oracle C++ Call Interface - Overview  Objects Access  Summary  Case Study - Using OCCI at CERN  Q & A

Summary I  Oracle C++ Call Interface OCCI – Simple and easy – High-performance and Scalable API – Comprehensive support of Oracle Database features – Ideal choice for implementing high performance mid-tier applications – 9i Release 2 focus on performance

Summary II  Easy migration of C++ applications – Determine UML class model – Import into Jdeveloper 9i – Re-model as required – Generate Oracle 9i object schema – Generate C++ header files with OTT – Modify C++ persistency classes as required

Agenda  Object Orientation and C++  Oracle C++ Call Interface - Overview  Objects Access  Summary  Case Study - Using OCCI at CERN  Q & A

C A S E S T U D Y Using OCCI at CERN

Overview  Brief introduction to CERN & LHC – Huge data volumes, long lifetime, Use of OO  Extensive experience with databases – Oracle since 1982; ODBMS since 1995  Migration of existing applications – Complex C++ programs; – Up to 1000 classes; – Many KLOC - MLOC

CERN – European Organization for Nuclear Research

The LHC Machine

RAWRAW ESDESD AODAOD TAG random seq. 1PB/yr (1PB/s prior to reduction!) 100TB/yr 10TB/yr 1TB/yr Data Users Tier0 Tier1

Overview  Brief introduction to CERN & LHC – Huge data volumes, long lifetime, OO  Extensive experience with databases – Oracle since 1982; ODBMS since 1995  Migration of existing applications – Complex C++ programs; – Up to 1000 classes; – Many KLOC - MLOC

CERN & Databases  Oracle brought in for construction of previous accelerator – 1982; LEP – 27km ring 100m underground – Now pervasive through-out work of lab  Early 1990s: move to object orientated approach for “physics applications” – Extensive experience with Object Databases – Until end 2001, baseline choice for multi-PB requirements of LHC – Production experience with ODBMS up to ~100TB  cf SLAC/BaBar 500TB system  Requirement for LHC: 100PB system (all data)

Overview  Brief introduction to CERN & LHC – Huge data volumes, long lifetime, OO  Extensive experience with databases – Oracle since 1982; ODBMS since 1995  Migration of existing applications – Complex C++ programs; – Up to 1000 classes; – Many KLOC – MLOC – Exploit associative and navigational access

OCCI / OTT Functionality  CERN has worked closely with Oracle since prior to Oracle 9i announcement on OCCI/OTT functionality, interfaces, implementation etc  Active partner in 9iR1 & 9iR2 Beta program  Happy to confirm that required functionality & product stability are available in 9iR2

Migration of Existing Apps (I)  Detector Conditions Database – Previously implemented on ODBMS – Same user interface re-implemented using OCCI  Client based on associative access No changes to user code! (Except connect string) – Complete re-design of underlying data model  Implemented using pure relational model Uses partitioned tables; materialized views; stored procedures; indexes; … – One of several applications for production 9iRAC service being setup at CERN  Other similar applications foreseen – Grid replica catalogue, production control DB, …

Migration of Existing Apps (II)  Take existing large C++ application  Strip out ODBMS-based persistency layer  Replace with OCCI using navigational access  Strong requirements from both user & developer point of view:  C++ Developer: – No change to object model & classes  User: – No change to application

CMS Offline Software – its big!

Functionality tests (I) Tests of basic components Simple objects Compound objects – Contain other user types as attributes Inheritance Composition by reference Collections by value & reference (II) Full object models Exploits all above features Stresses client-side object cache & navigation

CMS Migration  Independent module developed to handle DB interface – Oracle or ODBMS  Modification of the application and the implementation of the independent module totaled several hundreds of lines of code No other code was modified! From user application level … users are not aware of the change

Conclusions  OCCI offers powerful persistency mechanisms for C++ applications – Both associative & navigational access supported  Full power of database still available – Significant benefit over conventional ODBMS  Migration of complex applications proven – Achieved with no change to user code

A Q & Q U E S T I O N S A N S W E R S