Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modern Database Techniques Part 1: Object Oriented Databases 3. Different Kinds of OODB.

Similar presentations


Presentation on theme: "Modern Database Techniques Part 1: Object Oriented Databases 3. Different Kinds of OODB."— Presentation transcript:

1 Modern Database Techniques Part 1: Object Oriented Databases 3. Different Kinds of OODB

2 2 Overview OO language + persistence Pure OODB DB with object and relational access Object-Relational Databases Object oriented interface to relational databases

3 3 OO language + persistence Use a class library with an abstract class or interface for persistent objects. In your application create persistent classes as subclasses of that abstract class. Search for objects by object navigation. Write code for search yourself. No additional software like a database browser provided. Often only one OO language supported. No access to data by other languages.

4 4 OO language + persistence Dependent on the special product more or less support for transactions or concurrent access provided. Advantage: Not much overhead Disadvantage: Not much functionality Examples: GemStone, ozone Persistance Interface Your code DB

5 5 Pure OODBMS Pure OODBMS are similar to "OO language + persistence" They enhance this model considerably: OODBMS implement a subset of the ODMG-model Variety of predefined template classes for sets, lists, arrays, … with appropriate functions Persistent class offers a query-function Transactions, concurrency, logging, recovery, constraints, and triggers are supported. Tools for DB-schema development Tools like DB-browser

6 6 Pure OODBMS (cont.) Advantage: Complete DB functionality Disadvantage: Often only one or two OO languages supported. Examples: ObjectStore, Versant OODBMS Application 1 DB Application 2

7 7 DB with object and relational access Like pure OODBMS and relational databases Two different interfaces to database: OO interface and SQL interface SQL is also used for DB queries on the object side. Advantages: Well known query language Support of standard interfaces e. g. ODBC and JDBC Disadvantage: Not ODMG compliant.

8 8 DB with object and relational access Examples: Caché (InterSystems) Titanium (Savitar Corp.) OODBMS Application 1 DB Application 2 OO access SQL access Application 3

9 9 Object-Relational Databases Object oriented technology on top of relational technology and in the relational context. Define types instead of classes. Objects are stored in tables of objects rather than in tables of rows. Support of major object oriented features: complex types, inheritance, aggregation, methods Advantage: Extension of a well known technology Disadvantages: Mixture of both technologies may result in difficult to understand schemas Performance problems

10 10 Object-Tables instead of Tuple-Tables Meier, 1.5.60,... Huber, 11.5.69,... Miller, 1.12.60,... Meier, 7.5.80,... Object-Table Persons Person_type: Name, DateOfBirth,... Tuple-Table Persons Separation of structure definition and table definition as set of objects instead of set of tuples

11 11 Object-Relational Databases Examples: Oracle 10g IBM DB2 PostgreSQL

12 12 Object Oriented Interface to Relational Databases Object oriented access to persistent objects Persistent objects stored as rows in relational database Mapping of objects to rows transparent to application

13 13 Object Oriented Interface to Relational Databases Advantage: Use familiar object oriented programming techniques for your applications and relational techniques for databases. Disadvantages: Mapping not fully transparent Performance problems Example: Hibernate Application DB relational DBMS object side rel. side p.Save() insert into persons …


Download ppt "Modern Database Techniques Part 1: Object Oriented Databases 3. Different Kinds of OODB."

Similar presentations


Ads by Google