ObjectOriented Databases - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

ObjectOriented Databases

Description:

Fragmentation of real word' entities through normalization ... POET Software, Computer Associates, Versant Corporation) Four main parts: Object Model ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 59
Provided by: andyst5
Category:

less

Transcript and Presenter's Notes

Title: ObjectOriented Databases


1
Object-Oriented Databases
  • Andy Stafford
  • Kelly Traw
  • Max Podlesny
  • MyoungSoo Park

2
Overview
  • Introduction
  • Problems with RDBMS
  • Motivation for OO Data Model
  • Review of OO concepts
  • OODB design
  • Data Storage and Access
  • Object Models and Specification Languages
  • Object-Relational Databases
  • Strengths of OODBs
  • Weaknesses of OODBs

3
RDBMS Weaknesses
  • Fragmentation of real word entities through
    normalization
  • Lacks good support for integrity constraints
  • Fixed set of operations
  • Lacks seamless integration between DBMS and host
    language, i.e. impedance mismatch

4
OODB Motivation
  • Relation Model not powerful enough for many
    advanced database applications
  • Computer Aided Drafting (CAD)
  • Many types, dynamic design, parallel development
    (cooperative engineering)
  • Office Information Systems (OIS) and multimedia
    systems
  • Complex data storage (e.g. photographs,
    spreadsheets, voice commentary, hand drawn
    sketches, etc ..)

5
The OO debate
  • Agreement in database field that RDBMSs are
    inadequate for complex applications
  • RDBMS proponents argue support for such
    applications can be handled by extensions to
    relational model
  • OODB proponents argue an entirely new paradigm is
    necessary to support these complex applications

6
Object Oriented Database definition
  • A persistent and sharable collection of objects
    defined by an OODM
  • Another definition, abstract data types
    inheritance object identity database
    capabilities
  • No Universal agreement on OODBM!

7
OODBMS Manifesto
  • Lays out thirteen required features of an OODBMS
    including
  • Standard OO characteristics
  • E.g. encapsulation, types, classes, polymorphism,
    etc..
  • DBMS characteristics
  • Persistence
  • Scalable
  • Concurrency
  • Fault tolerance
  • Simple query support

8
The Object in the OODM
  • Similar to notion of Object in OOP object has
    state and behavior
  • Defined by classes
  • Constructors / Destructors
  • Operator overloading
  • Inheritance / Multiple inheritance
  • Polymorphism and Dynamic (late) Binding
  • Additionally, each object has unique Object
    Identifier (OID)
  • System generated
  • No dangling references
  • Enforces referential integrity
  • PK concept in RDBMS not sufficient
  • Fast and efficient

9
OO Database Design
  • OO Data Modeling (OODM) similar to EER (CDM)
    model
  • Relationships represented by reference attributes

10
UML and OO Database Design
  • UML can be used to aid in OO Database Design
  • Use Case Diagrams
  • Class Diagrams
  • Sequence Diagrams
  • State Diagrams

11
Persistence in OODBMS
  • Checkpointing
  • Saves entire address space to disk to secondary
    storage
  • May contain data that doesnt need to be
    persisted
  • Serialization
  • Write objects to flat-file
  • Not incremental writing large object expensive
  • Explicit paging
  • Reachability-based
  • Allocation-based

12
Data Storage and Access
  • RDBMSs two level storage model
  • Application storage model in main virtual
    memory
  • Database storage model on disk

Transformation
Main Memory
Secondary Storage
13
Data Storage and Access
  • OODBMS uses single level storage concept

Main Memory
Secondary Storage
14
Data Storage and Access
  • Resident Object Table (ROT)
  • Easy implementation, potentially inefficient
  • Pointer Swizzling
  • More complex, more efficient

15
Object Management Group (OMG)
  • Created the Object Management Architecture (OMA)
  • Object Model (OM)
  • Object Request Broker (ORB)
  • Object Services
  • Common Facilities
  • Common Object Request Broker Architecture (CORBA)
  • Interface Definition Language (IDL)
  • Model-Driven Architecture (MDA)

16
Object Data Standard ODMG 3.0
  • Proposed by the Object Data Management Group
    (ODMG)
  • (Sun Microsystems, eXcelon Corp., Objectivity
    Inc., POET Software, Computer Associates, Versant
    Corporation)
  • Four main parts
  • Object Model
  • Object Definition Language
  • Object Query Language
  • C, Java, and Smalltalk language bindings

17
Object Data Standard
  • Object Definition Language
  • Extends Interface Definition Language
  • Object Query Language
  • Expressions
  • Many types - elementary, construction, atomic,
    object, collection, conversion, and indexed
    collection expressions
  • Queries
  • ODMG Language Bindings
  • Object Manipulation Language (OML)

18
Applied Object Databases
  • ObjectStore a commercial OODBMS
  • Offers real-time data management, distributed
    data caching, and complex event processing
  • Delta Airlines, Northrop-Grumman, Amazon.com,
    Federal Express
  • http//www.objectstore.com/index.ssp
  • Caché - a post-relational database
  • Supports both SQL and object data access
  • Caché object model is based upon the ODMG
    standard
  • Fast transaction processing, scalability, and
    capability to execute real-time queries against
    transactional data
  • Available for Windows, OpenVMS, Mac OS X, Linux
    and UNIX platforms
  • http//www.intersystems.com/cache/index.html

19
Object-Relational Database Systems
  • RDBMS and OODBMS hybrid
  • Advantages
  • Reuse
  • Sharing
  • Disadvantages
  • Complexity
  • Costs

20
RDBMS
  • Decomposition of objects to primitive level
  • Data objects stay in a rudimentary state
  • - Number, Character
  • Pointers do not exist ( common in Hierarchical
    and Network DB)
  • Data Access is enabled by Primary and Foreign Key

21
RDBMS
  • The major advantage of declarative structure
  • The actual navigation path is hidden from users
  • SQL optimizer determines the path
  • Not supported
  • When working with collection types and complex
    types, key can not reference the objects

22
Transition to ORDBMS
  • Consider RDBMS first
  • Add the feature of object-oriented processing to
    RDBMS
  • Redesign RDBMS structure to support multimedia
    function
  • Storage techniques for handling objects

23
To Enable Object Functionality
  • Two Important points
  • Logical design aspects of schema
  • - Data type
  • - How to access data
  • The physical implementation of the logical schema
  • - SQL semantic support object

24
Object Functionality in ORDBMS
  • Behavior
  • - A method a function of a particular class
  • Collection type
  • An aggregate object
  • - a data-type definition composed of many
    subtypes coupled with behaviors
  • A nested table a derived table

25
Object Functionality in ORDBMS
  • Encapsulation
  • Defining Class
  • - Data ? attribute
  • - Function ? method
  • Polymorphism
  • - Each class can have deferent objects for
    deferent responses to same request
  • - Function overloading in C
  • Inheritance
  • - Subclassing
  • - An object inherits a certain set of
    attributes from another object

26
ORDBMS Features
  • Constituent element for object orientation
  • - User-definition types
  • - Type constructor for row types, reference
    type and collection types
  • - User-definition function and procedures
  • - Support for large objects ( Binary Large
    objects and Character Large Objects )

27
Benefit of reference type
  • Pointer to repeating values
  • - Simplify DB design
  • Accessing non-database objects in a flat file
  • - Used as a means of effective multimedia
    data accessing
  • Data relationship without foreign key
  • - Instead of slow SQL JOIN statements

28
Traditional System Analysis
  • Data Flow Diagram (DFD)
  • - A description of all processes, the data
    flow between them and data stores.
  • Data Dictionary
  • - A description of the logical data items
  • Process logic specification
  • - A description of all functional primitive
    processes

29
Object-oriented analysis
  • Traditional structured analysis AND
  • A list of all objects
  • A list of all services (behaviors) of processes
  • A list of associating the primary services with
    each object
  • A description of relationships in the system
  • A behavior script for each object
  • A classification for each object and the object
    relationship

30
Choosing a Data Model
  • When You have to decide to choose a DBMS package
    related to Object- oriented paradigm
  • The third options
  • Neither ORDMS nor OODBMS
  • Used for avoiding complexity and high cost

31
Component Object Model (COM)
  • Microsoft's framework for developing and
    supporting program component objects
  • Equivalent capabilities to features in CORBA
  • A framework for the interoperation of distributed
    objects in a network

32
The Third Option (Example)
Request
Response
ATL COM Server
ODBC
SQL Server
33
Why choose OODB?
34
OODBs allow users to define abstractions
  • Ability to define new abstractions
  • Ability to control the implementation of
    abstractions
  • Allowance the definition of objects as aggregates
    of other objects
  • Allowance to have aggregations be nested at
    several levels

35
OODBs allow users to define abstractions
  • Ability to make properties be non-primitive
    objects as values, allowing deeply nested object
    structures
  • Use of multi valued properties to express complex
    data structures.
  • It is not the case in the RDB model where one
    need to use additional relations and joins

36
OODBs facilitate development of some relationships
  • The feature of inverse relationships to express a
    mutual reference between two objects (a binary
    relationship)
  • This feature ensures referential integrity by
    establishing corresponding reference as soon as a
    reference is created
  • Possibility to automatically propagate deletion
    via these references

37
OODBs eliminate need for user defined keys
  • OID is generated automatically by the system and
    that guarantees uniqueness to each object
  • Elimination the need for user to define keys in
    the OODB model

38
OODBs eliminate need for user defined keys
  • Elimination the need for user to define keys in
    the OODB model
  • the OID cannot be modified by the application
  • the notion of object identity provides a separate
    and consistent notion of identity, independent of
    how an object is accessed or modeled with
    descriptive data
  • two objects are different if they have different
    OID even if they have the same structures and the
    same values for all properties
  • user-defined keys are used to provide uniqueness
    of objects in RDBs

39
Development of equality predicates
  • In the RDB model equality is always based only on
    values of attributes
  • OODBs have different types of equality

40
Development of equality predicates
  • OODBs have different types of equality
  • Identity equality of objects. Two objects, S1 and
    S2 are equal if they have the same OID.
  • Value equality of objects. This can be determined
    in two ways
  • Two primitive objects are equal if they have the
    same value.
  • Two non-primitive objects are equal if they have
    the same number of properties, and if, for any
    property Pi of S1 there exists a property Pi of
    S2 that is equal in value.
  • Value equality of properties.
  • Identity equality of properties.

41
OODBs reduce need for Joins
  • The capability of navigating through object
    structures and the resulting path expressions in
    object attributes provides two types of join
  • the implicit join, derived from the hierarchical
    nesting of objects
  • the explicit join, which is similar to the
    relational join where two objects are explicitly
    compared by using either the value or the
    identity equality

42
Performance gain using OODBs
  • The value of an attribute of an object X, whose
    domain is another object Y, is the object
    identifier (OID) of the object Y
  • If an application has already retrieved object X
    and now would like to retrieve object Y, the
    database system could retrieve object Y by
    looking up its OID.
  • RDBs do not support OID so this cannot be made so
    easily

43
Performance gain using OODBs
  • Most OODBs convert the OIDs stored in an object
    to memory pointers when the object is loaded into
    memory
  • RDBs cannot store memory pointers to other tuples
    because of absence of OIDs
  • the facility to navigate through memory-resident
    objects is a fundamentally absent feature in RDBs
  • the performance drawback that results from it
    cannot be neutralized by simply having a large
    buffer space in memory

44
Support for versioning or long-duration
transactions
  • Few OODBs offer versioning and long-duration
    transactions, though with limited facilities
  • Versioning and long-duration transactions are
    missing in RDBs

45
Development of Object Algebra
  • Object algebra defines five fundamental
    object-preserving operators
  • Union. Returns objects that are in sets P or Q or
    both.
  • Difference. Returns the set of objects that are
    in set P and not in set Q.
  • Select. Returns a subset of an input set.
  • Generate. Generates objects from those in the
    input sets.
  • Map. Returns a set of objects resulting from each
    sequence application.
  • Other operators like intersection may be defined
    from these fundamental operators.

46
What OODB weaknesses exist?
47
Interoperability between RDBs and OODBs
  • Absence of sufficient compatibility with RDBs
  • Need of a migration path to allow the coexistence
    and the gradual migration from the current
    products to new products
  • Absence of unified architectures of RDBs and
    OODBs
  • Absence of unified data models of RDBs and OODBs

48
Minimal query optimization
  • One of the biggest problems
  • Complexity of the optimization of OODBs queries
    because of the presence of the additional
    complexity of the object-oriented data model
  • additional data types
  • changing variety of types
  • complex objects, methods and encapsulation
  • the use of nested structures
  • object identity
  • Todays OODBs offer rather simple optimization
    strategies.

49
Lack of standard query algebra
  • Other big problem
  • Several different formal query languages of
    algebras and calculi have been proposed
  • Absence of analogous, intuitive correspondence
    between object algebra operators and physical
    system primitives in OODBs
  • Close correspondence between algebra operations
    and low level primitives of the physical system
    in RDBs

50
Lack of query facilities
  • Only few systems provide significant query
    facilities, but the query language is not ANSI
    SQL compatible.
  • No object query standard

51
Security
  • Most OODBs do not support authorization
  • RDBs have a good support mechanism

52
Little support for complex objects
  • Absence of full functionality of complex objects
  • no predefined generic operations exploiting
    different reference semantics

53
No support for dynamic class definition changes
with OODBs
  • Most OODBs do not allow dynamic changes to the
    database schema, such as
  • adding a new attribute or method to a class
  • adding a new superclass to a class
  • dropping a superclass from a class
  • adding a new class
  • dropping a class
  • RDBs allow the user to change the database schema
    dynamically using the ALTER command

54
Limited support for consistency constraints in
OODBs
  • Absence of mechanisms to declare
  • key properties of attributes (for example, an
    attribute of a class cannot be declared the
    primary key of the class) or uniqueness
    constraints
  • explicit consistency constraints
  • pre and postconditions of methods
  • Explicit consistency constraints would be more
    easily accessible for inspection and modification

55
Limited performance tuning capability in OODBs
  • Most of the OODBs offer limited capabilities for
    parameterized performance tuning

56
Limited performance gain over RDBs
  • No performance advantages over RDBs while meeting
    the following requirements
  • bulk database loading
  • creation, update, and delete of individual
    objects
  • retrieval from a class of one or more objects
    satisfying certain search conditions
  • joins of more than one class
  • transaction commit

57
Other features that OODBs do not support
  • Triggers
  • Meta data management features
  • Constraints such as UNIQUE and NULL
  • No support for views in OODBs
  • OODBs do not support views
  • The development of an object-oriented view
    capability is complicated by object identity.
  • There is also the argument that data
    encapsulation and inheritance make explicit view
    definitions unnecessary

58
References
  • Sikha Bagui, Achievements and weaknesses of
    Object-Oriented Databases, Journal of Object
    Technology, Vol. 2, No. 4, July-August 2003
  • Piotr Habela and Kazimierz Subieta, Overcoming
    the Complexity of Object-Oriented DBMS Metadata
    Management
Write a Comment
User Comments (0)
About PowerShow.com