Download presentation
Presentation is loading. Please wait.
1
Object-Oriented Methods: Database Technology An introduction
2
Lecture Overview Background Database Relational versus OO Solutions for Object Persistence Object-Oriented Database Object-Relational Commercially available products
3
Database systems Primary purpose: Managing persistent data Provide efficient and safe access to very large quantities of data via high level query language Other common features Transaction management in a multi-user environment Control of data ownership and access Validation and consistency checking Recovery from system and hardware failure
4
Motivation OO applications need object persistence Persistence – ability to exist beyond the running time of an application. Implemented by storing the objects off-line on a secondary storage device No strong support for persistence in OOPL’s
5
One solution… Could use a relational database (RDBMS) Store objects in the form of attribute tables Main or virtual memory Transformation and type checking Secondary storage
6
Problems with using relational model Programmer needs to write code for Translate from application’s object model into RDBMS (could take up to 30 % of coding effort) Type checking In relational model, typically many normalized tables are used to represent a real-world object. Tables are combined using joins – a slow operation! Especially problematic for complex objects- a noticeable overhead in application-database communication in order to reconstruct an entire object.
7
Benefits of relational model Well grounded in theory, thus Portability: once written, the database application can be easily converted to another vendor’s RDBMS Powerful query mechanism
8
Object-oriented database (OODB) Database + Object Orientation Conceptually, an object in OODB stores both attributes and methods (services) In reality, the data (attributes) are stored separately from the methods code. Methods could be written in an OO programming language. Supports object identity, inheritance, whole-part relations and object associations. OQL – object query language
9
Object-oriented database (OODB) Main or virtual memory Secondary storage Intuitively clear idea, but needs a clever way of managing representations of objects in memory an on disk to achieve the illusion of transparency (pointer swizzling)
10
Benefits of object-oriented database 1. Can be directly used from an OO program 2. Is semantically richer (can express more) than the relational model 3.Other factors
11
Benefits of object-oriented database 1. Can be directly used from an OO program Uniform mode in which real world concepts are represented throughout the system, including the database component simplifies the design and implementation 2. Semantic richness of OO data model Can express whatever an entity-relationship, hierarchical and network model can express and more
12
Benefits of object-orientation in database Mirrors benefits of OO: ease of reuse and extensibility Better performance over other representations when complex objects and complex relationships must be dealt with, because there is no need to break up large objects into many normalized tables and reassemble them via join operations. Example domains: engineering drawings and complex graphics
13
Benefits of object-orientation in database 3. … continued Generally better navigation control over queries, because pointers to related objects are stored in objects themselves. Easier to identify parts of the data that is likely to be accessed simultaneously. Keeping related (via instance connections, whole-part relations) objects close together and retrieving them simultaneously usually minimizes disk access time. Map well on distributed architectures.
14
Pitfalls of object-oriented databases No universally accepted object-oriented data model, and resulting discrepancies in commercially available products Although some have wide acceptance and may converge to one eventually ODMG – a consortium of OODB vendors works to establish standrad Object Data Language (ODL) and Object Query Language (OQL) Performance depends on a type of application Still unresolved problems concerning concurrency, locking and query optimization
15
Relational versus OODB Relational model fits well the application domains that are regular and have large number of instances Examples: many traditional banking applications, payroll, personnel data, etc OODB fits well application domains with sparse complex objects Examples: complex graphics, CAD systems, multimedia, complex inventory, etc
16
Object-relational databases Original name– Extended Relational DBMS Based on SQL, enriched with OO features SQL3 standard Most database vendors are pushing in this direction.
17
Commercial systems ODBMS ObjectStore – good performance, C++ and Java interface O 2 – supports OQL, pioneered a lot of concepts in OODatabase, used for many commercial applications. Programming environment includes graphical browser and debugger. Object-Relational ORDB (formerly UniSQL) – flexible query capabilities of a relational product combined with semantic richness of an object-oriented one.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.