Escolar Documentos
Profissional Documentos
Cultura Documentos
Slide 1/22
12.0 Content
Content
12.1 Objectives 12.2 Introduction to OO data models and OODBMSs
- Persistent programming languages (PPLs) - Alternative strategies for developing an OODBMS
12.4 Persistence
- Persistence schemes - Orthogonal persistence
12.6 The OO database System Manifesto 12.7 Advantages and disadvantages of OODBMSs
Slide 2/22
12.1 Objectives
Objectives
Framework for an OODM. Basics of persistent programming languages (PPLs). Main strategies for developing an OODBMS. Single-level v. two-level storage models. Pointer swizzling. Persistence schemes. Advantages and disadvantages of orthogonal persistence. Issues underlying ODBMSs. Advantages and disadvantages. OODBMS Manifesto.
Slide 3/22
Khoshafian & Abnous OODBMS definition: OO= ADTs + Inheritance + Object identity OODBMS= OO + Database capabilities.
Slide 4/22
The more encompassing term Persistent App System (PAS) is sometimes used now.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 5/22
3.
4.
5.
Extend existing object-oriented programming language. - GemStone extended Smalltalk. Provide extensible OODBMS library. - Approach taken by Ontos, Versant, and ObjectStore. Embed OODB language constructs in a conventional host language. - Approach taken by O2,which has extensions for C. Extend existing database language with object-oriented capabilities. - Approach being pursued by RDBMS and OODBMS vendors. - Ontos and Versant provide a version of OSQL. Develop a novel database data model/language.
Slide 6/22
OODBMS Perspectives
-Traditional programming languages lack built-in database features support -Increasing no. of apps require functionality from both database and PLs -Apps need to store/retrieve large amounts of shared, structured data. Traditional DBMS difficulties: programmer has to:
-Decide when to read and update objects. -Write code to translate between apps object and DBMS data model -Perform additional type-checking when object is read back from database, to guarantee object will conform to its original type.
Two-level storage model (Conventional DBMSs): storage model in memory, database storage model on disk. Single-level storage model (OODBMSs): illusion of, with similar representation in both memory and in database stored on disk. Requires clever management.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 7/22
Techniques 1. No Swizzling: - Easiest implementation is not to do any swizzling. - Objects faulted into memory, and handle passed to app containing OID. - OID is used every time the object is accessed. - System maintains lookup table so objects virtual memory pointer can be located and then used to access object. - Inefficient if same objects are accessed repeatedly.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 8/22
- Node marking requires that all object references are immediately converted to virtual memory pointers when object is faulted into memory.
3. Hardware based schemes: - Use virtual memory access protection violations to detect accesses of non-resident objects. - Use standard virtual memory hardware to trigger transfer of persistent data from disk to memory. - Avoids overhead of residency checks incurred by software approaches.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 9/22
Slide 11/22
12.4 Persistence
DBMS must provide support for persistent objects, ones that survive after creator program has terminated.
1. Checkpointing: Copy all/part programs address space to 2ndary storage. Two main drawbacks:
1. Can only be used by program that created it. 2. May contain large amount of data that is of no use in subsequent executions.
Persistence schemes
3. Explicit Paging: Object only made persistent if explicitly declared as such within the application program. By class: class statically declared to be persistent, all instances made persistent when they are created. By explicit call: object specified as persistent when created or at runtime.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 12/22
12.4 Persistence
Orthogonal Persistence
12.4 Persistence
Orthogonal Persistence
Advantages: Improved programmer productivity from simpler semantics. Improved maintenance. Consistent protection mechanisms over whole environment. Support for incremental evolution. Automatic referential integrity. Disadvantages: Some runtime expense in a system where every pointer reference might be addressing persistent object. System required to test if object must be loaded in from disk-resident database. Although orthogonal persistence promotes transparency, system with support for sharing among concurrent processes cannot be fully transparent.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 14/22
Issues in OODBMSs
Previously: problem areas for relational databases:
Long duration transactions Versions Schema evolution How these issues are addressed in OODBMSs: 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. 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.
Slide 15/22
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.
Architecture
Three basic Client-server architectures:
1. Object Server: distribute processing between the two components. Typically, client is responsible for T management & interfacing to PL Server responsible for other DBMS functions. Best for cooperative, object-to-object processing in an open, distributed environment. 2. Page Server: Most database processing is performed by client. Server responsible for secondary storage and providing pages at clients request. 3. Database Server: Most database processing performed by server. Client passes requests to server, receives results and passes to app. Approach taken by many RDBMSs.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 17/22
Benefits of (b): Eliminates redundant code. Simplifies modifications. Methods are more secure. Methods can be shared concurrently. Improved integrity.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 18/22
Benchmarking: 2 Examples
Wisconsin Benchmark: Developed to allow comparison of particular DBMS features. Consists of set of tests as a single user covering:
updates/deletes involving key and non-key attributes projections involving different degrees of duplication in the atts and different selections on indexed/non-index and clustered atts joins with different selectivities aggregate functions.
OO7 (Object Operations Version 7): More comprehensive set of tests and database based on parts hierarchy. Designed for detailed comparisons of OODBMS products. Simulates CAD/CAM environment, tests system performance of object-to-object navigation over cached data, disk-resident data, and sparse/dense traversals. Also tests indexed/nonindexed updates of objects, repeated updates, and the creation and deletion of objects.
III. Current Trends: 3 - Object DBMSs: concepts and design Slide 19/22
12.6 OO manifesto
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.
Slide 21/22
12.7 Summary
Summary
12.1 Objectives 12.2 Introduction to OO data models and OODBMSs
NEXT LECTURE:
III Current Trends Part 4: Object-Relational DBMSs: background to ORDBMS third manifesto Postgres-An Early ORDBMS Query Processing and Optimization
12.6 The OO database System Manifesto 12.7 Advantages and disadvantages of OODBMSs
Slide 22/22