Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
Advertisements

® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
A brief look at CORBA. What is CORBA Common Object Request Broker Architecture developed by OMG Combine benefits of OO and distributed computing Distributed.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Informatiesystemen in de Bouw 7M711 Joran Jessurun en Jos van Leeuwen Week 3.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Teleprocessing.
1 CS 502: Computing Methods for Digital Libraries Lecture 22 Repositories.
Lecture 4: Introduction to PHP 3 PHP & MySQL
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
1 INTRO TO BUSINESS COMPONENTS FOR JAVA (BC4J) Matt Fierst Computer Resource Team OracleWorld Session
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
JavaScript and The Document Object Model MMIS 656 Web Design Technologies Acknowledgements: 1.Notes from David Shrader, NSU GSCIS 2.Some material adapted.
Management Information Systems, 4 th Edition 1 Chapter 8 Data and Knowledge Management.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Avro Apache Course: Distributed class Student ID: AM Name: Azzaya Galbazar
CSS/417 Introduction to Database Management Systems Workshop 5.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
OracleAS Reports Services. Problem Statement To simplify the process of managing, creating and execution of Oracle Reports.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Unified Modeling Language, Version 2.0
Open Data Protocol * Han Wang 11/30/2012 *
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Architecture: Component and Deployment Diagrams Patrick Bailey Keith Vander Linden Calvin College.
MACIASZEK, L.A. (2001): Requirements Analysis and System Design. Developing Information Systems with UML, Addison Wesley Chapter 6 - Tutorial Guided Tutorial.
XML Registries Source: Java TM API for XML Registries Specification.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
A Simple Java Relational Database Thomas A. Bullinger March 20, 2001
ALICE, ATLAS, CMS & LHCb joint workshop on
Chapter 8 Data and Knowledge Management. 2 Learning Objectives When you finish this chapter, you will  Know the difference between traditional file organization.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
Implementation Diagrams
R R R CSE870: UML Component Diagrams Implementation Diagrams.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Object Oriented Software Development
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
Management Information Systems, 4 th Edition 1 Chapter 8 Data and Knowledge Management.
Greenstone Internals How to Build a Digital Library Ian H. Witten and David Bainbridge.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
Persistent State Service 1  Concept  Persistence is the ability of an object state to survive termination of the process in which the object executes.
Getting Started with SIDL using the ANL SIDL Environment (ASE) ANL SIDL Team MCS Division, ANL April 2003 The ANL SIDL compilers are based on the Scientific.
9/12/99R. Moore1 Level 2 Trigger Software Interface R. Moore, Michigan State University.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Object storage and object interoperability
9/28/2005Philippe Canal, ROOT Workshop TTree / SQL Philippe Canal (FNAL) 2005 Root Workshop.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
NMD202 Web Scripting Week2. Web site
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Java Object-Relational Layer Sharon Diskin GUS 3.0 Workshop June 18-21, 2002.
CSC 243 – Java Programming, Spring, 2014 Week 4, Interfaces, Derived Classes, and Abstract Classes.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
CSC 243 – Java Programming, Fall, 2008 Tuesday, September 30, end of week 5, Interfaces, Derived Classes, and Abstract Classes.
POOL Based CMS Framework Bill Tanenbaum US-CMS/Fermilab 04/June/2003.
R R R CSE870: UML Component Diagrams Implementation Diagrams.
Object-Orientated Programming
Ch > 28.4.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
MANAGING DATA RESOURCES
Chapter 15 Introduction to Rails.
Analysis models and design models
Presentation transcript:

Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002

Calibration Database Browser Workshop2 D0OM Components D0OM Object Model. Preprocessor and dictionary system. I/O Interface. –Non-database: d0Stream. Open/close/read/write. –Database: d0StreamDB. Query. Calibration Data Model. –Superset of D0OM object model. I/O back ends. –DSPACK/EVPACK. –Direct Oracle (d0omORACLE). C++ to database mapping dictionary. –Client-Server Oracle (d0omCORBA). C++ to database mapping dictionary.

Apr. 8, 2002Calibration Database Browser Workshop3 D0OM I/O Classes

Apr. 8, 2002Calibration Database Browser Workshop4 Calibration Architectures Calibration Manager d0omORACLE Oracle Database D0OM Dictionary Mapping Dictionary Calibration Manager Low Level Server Mapping Dictionary D0OM Client D0OM Dictionary High Level D0OM Server Direct Database Connection Database Client-Server Architecture Calibration Data Model Calibration Data Model Oracle Database

Apr. 8, 2002Calibration Database Browser Workshop5 Client Server Architecture Client and server use corba protocol to communicate. Client written in C++ (e.g part of d0reco). –Uses orbacus corba implementation. –Dynamic corba (no compiled in knowledge of database schema). Only type any (no dynany). Server written entirely in python. –Uses omniorb corba implementation. –Consists of high level part (schema independent) and low level part (schema- specific generated idl and python). –Schema specific part generated using fnal product db_server_gen (script dbgen.py).

Apr. 8, 2002Calibration Database Browser Workshop6 D0OM Object Model Atomic types. Strings. Arrays. Bare pointers. STL collections. D0OM base class: d0_Object. D0OM smart pointer: d0_Ref. User-defined classes.

Apr. 8, 2002Calibration Database Browser Workshop7 Calibration Data Model Database base class: d0_DBObject. Query Classes. –d0_Query and d0_Query_Base. Database Pointers. –d0_DynRef. –d0_RefTo. Database Collections –d0_Query_Collection. –d0_RefBy. Database key class. –Abstract class d0_DBKey. –Concrete classes d0_DBKey_1, d0_DBKey_2, etc.

Apr. 8, 2002Calibration Database Browser Workshop8 Database Base Class Class d0_DBObject contains database key. –Template parameter class K must fulfill d0_DBKey interface requirement. Attribute name fields of key are filled automatically from dictionary when d0_DBObject is constructed.

Apr. 8, 2002Calibration Database Browser Workshop9 Database Pointer Classes The database pointer classes inherit D0OM smart pointer interface (d0_Ref ). The database pointer classes support true deferred I/O: –They can be initialized to point to an object in a database without doing any I/O. (This was not true for dspack d0_Ref.) d0_DynRef represents a relationship based on a general query object, which can be specified at run-time. –Can not be stored in database. d0_RefTo represents a static one-to- one relationship based on key class K. –Key is automatically converted to query. –Points to d0_DBObject or d0_RefTo<>/d0_RefBy<> (symmetric relationship). –Can be stored in database.

Apr. 8, 2002Calibration Database Browser Workshop10 Smart Pointer Class Diagram

Apr. 8, 2002Calibration Database Browser Workshop11 Database Collections The database collection classes have interfaces similar to an STL collection. The database collection classes also support true deferred I/O. d0_Query_Collection represents a run- time collection based on a general query (plural version of d0_DynRef ). d0_RefBy represents a static one-to- many relationship based on key K (plural version of d0_RefTo ).

Apr. 8, 2002Calibration Database Browser Workshop12 Query Classes Query classes d0_Query and d0_Query_Base act as front end to query method d0StreamDB::query. d0_Query returns collection of d0_Ref ’s when executed. d0_Query_Base returns a collection of d0_Ref_Any’s when executed.

Apr. 8, 2002Calibration Database Browser Workshop13 Database Key Classes Abstract class d0_DBKey and subclasses. Unlike ordinary persistent data, database keys know the names of their database columns. –Keys can easily be turned into query objects. –Keys can be constructed by hand, or extracted from database base objects.

Apr. 8, 2002Calibration Database Browser Workshop14 Public Indirect Pointers New public indirect pointer class d0om_Query_Indptr is not specific to any D0OM I/O mechanism (but requires d0StreamDB::query to be implemented by back end).

Apr. 8, 2002Calibration Database Browser Workshop15 C++ to Database Mapping Goals: –Full support for D0OM object model, including polymorphism (e.g. for writing event data). –Flexible C++ to database mapping (e.g. for reading a human designed database).

Apr. 8, 2002Calibration Database Browser Workshop16 Database Representation of C++ Objects. Ordinary (non-database) persistent objects (derived from d0_Object). Database persistent objects (derived from d0_DBObject. Object id. & reference count columns are optional.

Apr. 8, 2002Calibration Database Browser Workshop17 Database Representation (cont.) Ordinary pointers and d0_Ref ’s. Dynamic type column and type table are optional. Not use in D0.

Apr. 8, 2002Calibration Database Browser Workshop18 Database Representation (cont.) Database smart pointer d0_RefTo. Dynamic pointers are not polymorphic. Object id and reference count columns not used in D0.

Apr. 8, 2002Calibration Database Browser Workshop19 Database Representation (cont.) STL Collection. Not used in D0.

Apr. 8, 2002Calibration Database Browser Workshop20 Database Representation (cont.) Database collection d0_RefBy. Object id and reference count not used in D0.

Apr. 8, 2002Calibration Database Browser Workshop21 External Database Dictionary D0omORACLE and d0omCORBA use an external python mapping dictionary. The following elements of C++ to database mapping can be controlled. –Class name  Table name. –Data member name  Column name. –Server-based foreign key relationships. –Metadata table and column names (not currently used). External dictionary is input to db_server_gen. I believe that it is possible to generate database dictionary automatically (i.e. from oracle designer), but I don’t know how.

Apr. 8, 2002Calibration Database Browser Workshop22 Generating server files using db_server_gen Need database dictionary files. –GENLIST.py (contains list of table modules) –MASTER.py (list of directories) –One python file for each database table. –Python modules must be on $PYTHONPATH. Run script dbgen.py to generate low level server files: % setup db_server_gen % dbgen.py –d0om Files generated: –Base layer idl files (one per table). –Python server files. –C++ header and implementation files.

Apr. 8, 2002Calibration Database Browser Workshop23 Programming Using d0omORACLE/d0omCORBA Use stream factory to open stream. d0StreamFactory* factory = d0StreamFactory::locateStreamFactory(); d0StreamDB* stream = factory->make_d0StreamDB(name, “”, ios::in); –Specific stream type is “ORACLE,” “CORBA,” or “” (empty string). –For d0omORACLE, specify stream name as database connect string (password optional). –For d0omCORBA, specify stream name as corba name of server (as registered with name server).

Apr. 8, 2002Calibration Database Browser Workshop24 Programming Using d0omORACLE/d0omCORBA Linking. –Force load LoadORACLE.o or LoadCORBA.o. –Link with D0 libraries –ld0omORACLE or -ld0omCORBA. –For product libraries use srt_d0 makefile fragments arch_spec_oracle.mk or arch_spec_corba_common.mk and arch_spec_orbacus.mk (automatic with ctbuild).

Apr. 8, 2002Calibration Database Browser Workshop25 Running d0omCORBA programs Start the server. –Add dictionary files (GENLIST.py, etc.) and generated python files to $PYTHONPATH. –Setup products omniOrb, dcoracle, and sam_util (or sam). –Specify database user name/password using env variables DB_SERVER_USERNAME and DB_SERER_PASSWORD. –Start server: % DbListener.py –n= -t=d0om –c=ServantFactory –m= Running the client. –Setup fnal product sam_util or sam (makes corba naming service available). –Run client program. Client can run on different node than server. Password is not required for client.

Apr. 8, 2002Calibration Database Browser Workshop26 Documentation D0omCORBA and d0omORACLE –d0omCORBA/doc/database_access.ps –d0omCORBA/doc/database_dictionary.ps. Calibration data model. –d0stream/doc/calibration_classes.ps. D0om generally. –d0om/d0c/d0om_user_guide.ps.