OO Programming Languages
OO Programming Languages
OO programming languages already provide solutions to many of these issues Idea: incorporate OO programming language features into DBMSs
Khoshafian & Abnous OODBMS definition: OO= Abstract Data Types + Inheritance + Object identity OODBMS= OO + Database capabilities.
- 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.
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.
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.
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.
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.