Вы находитесь на странице: 1из 8

OO Programming Languages

OO programming languages already provide solutions to many of these issues Idea: incorporate OO programming language features into DBMSs

14.4 Introduction to OO data models

OO data models and OODBMSs


OODM: Object-Oriented Data Model. Data model that captures semantics of objects supported in object-oriented programming. OODB: Object-Oriented Database. Persistent and sharable collection of objects defined by an ODM. OODBMS: Object-Oriented DBMS. Manager of an ODB.

Zdonik & Maiers threshold model that OODBMS must, at a min:


provide database functionality. support object identity. provide encapsulation. support objects with complex state.

Khoshafian & Abnous OODBMS definition: OO= Abstract Data Types + Inheritance + Object identity OODBMS= OO + Database capabilities.

14.4 Introduction to OO data models

Origins of the Object-Oriented Data Model

- RDBMS: object identity is value-based, primary key provides uniqueness. - Primary keys do not provide type of object identity required in OO systems: key only unique within a relation, not across entire system key chosen from atts of relation, making it part of object state. They cannot be modified by the user. They are independent of content.

14.4 Introduction to OO data models

OO Concepts: Object Identity


An object has a unique identity, which is represented by an Object Identifier.
Object identifier (OID) assigned to object when it is created that is:
System-generated. Unique to that object. Invariant. Independent of the values of its attributes (that is, its state). Invisible to the user (ideally). Cannot be changed. Can never refused. Advantages of OIDs: They are efficient. They cannot be modified by the user. They are independent of content. They are fast.

14.6 Issues in OODBMSs

Issues in OODBMSs
Previously: problem areas for relational databases:
Long duration transactions Versions Schema evolution How these issues are addressed in OODBMSs: 1. 1. Transactions: unit of concurrency control and recovery is an Object. - Locking based protocols most common type of CC mechanism - Multiversion CC protocols & advanced T models, such as sagas 2. 2. Versions: Allow changes to properties of objects to be managed so that object references always point to correct object version. Itasca identifies 3 types of versions:
1. 2. 3. Transient Versions. Working Versions. Released Versions.

14.6 Issues in OODBMSs

Issues in OODBMSs
3. Schema Evolution: Some apps require considerable flexibility in dynamically defining and modifying database schema Typical schema changes: (1) Changes to class definition: (a) Modifying Attributes. (b) Modifying Methods. (2) Changes to inheritance hierarchy: (a) Making a class S superclass of a class C. (b) Removing S from list of superclasses of C. (c) Modifying order of superclasses of C. (3) Changes to set of classes, such as creating and deleting classes and modifying class names.

Changes must not leave schema inconsistent.

14.8 OO Database Manifesto

The OO Database system manifesto


Complex objects must be supported. Object identity must be supported. Encapsulation must be supported. Types or Classes must be supported. Types or Classes must be able to inherit from their ancestors. Dynamic binding must be supported. The DML must be computationally complete. The set of data types must be extensible. Data persistence must be provided. The DBMS must be capable of managing very large databases. The DBMS must support concurrent users. DBMS must be able to recover from hardware/software failures. DBMS must provide a simple way of querying data.

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

+ optional features including type checking/inferencing, versions

Advantages/disadvantages of OODBMSs
Advantages: Enriched Modeling Capabilities. Extensibility. Removal of Impedance Mismatch. More Expressive Query Language. Support for Schema Evolution. Support for Long Duration Ts. Applicability to Advanced Database Apps. Improved Performance. Disadvantages: Lack of Universal Data Model. Lack of Experience. Lack of Standards. Query Optimization compromises Encapsulation. Object Level Locking may impact Performance. Complexity. Lack of Support for Views. Lack of Support for Security.

Вам также может понравиться