Object-Oriented Database Management Systems (ODBMS) - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Object-Oriented Database Management Systems (ODBMS)

Description:

Title: Data Mining and Data Warehousing Author: Owner Last modified by: Owner Created Date: 11/18/2004 3:31:18 PM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:497
Avg rating:3.0/5.0
Slides: 16
Provided by: Own2466
Category:

less

Transcript and Presenter's Notes

Title: Object-Oriented Database Management Systems (ODBMS)


1
Object-Oriented Database Management Systems
(ODBMS)
  • By Wendy Wooters
  • CS157B

2
ODBMS Outline
  • Definition
  • Why
  • Who
  • Approaches
  • Persistent Programming Languages
  • Object-Oriented Concepts
  • Object
  • Class Encapsulation
  • Inheritance Polymorphism
  • Object Identifier (OID)
  • Advantages and Disadvantages
  • Example Code
  • Conclusion

3
What is an ODBMS?
  • Database that stores data elements as objects.
    Uses object-oriented concepts.
  • Object - like an entity in and E-R Diagram.

4
Why use ODBMS?
Product DB
  • Complex data or relationship requirements
  • Lack of unique, natural identification
  • Large numbers of many to many relationships
  • Access using traversals. Graph/Tree structure.
  • Frequent use of type codes such as those found in
    the relational schema

Source http//www.service-architecture.com/object
-oriented-databases
5
Who Uses ODBMS?
  • Typical Applications for ODBMS
  • Computer-aided design (CAD)
  • Computer-aided software engineering (CASE)
  • Multimedia databases
  • Images, video, games, etc.
  • Office automation systems (OIS)
  • Expert database systems

6
Approaches for ODBMS
  • Relational DB extended to use object-oriented
    concepts. (Object-relational DB)
  • DB is Relational
  • Programming language is object-oriented.
  • Object-oriented DB model.
  • Application and database use same object-oriented
    model.
  • Uses persistent programming languages.

7
Persistence Programming Languages
  • A programming language that directly manipulates
    persistent data in a database.
  • Persistent data exists after the program
    terminates.
  • Single program for application and data
    management. No translation from database to
    application programming needed.
  • Used with the object-oriented DB model approach.

8
Object-Oriented Concepts Object
  • Object is an entity containing
  • Variables/Attributes Object Data
  • Relationships References to other objects
  • Methods Object Functions
  • Messages Accessing Methods

9
Object-Oriented Concepts Class Encapsulation
  • Public class Employee
  • //Class Attributes
  • private int SSN
  • private String name
  • private Date hired
  • private double salary
  • //Class Constructor
  • public Employee()
  • //Class Accessor Methods
  • public int getSSN()
  • public String getName()
  • public Date getHired()
  • public double getSalary()
  • //Class Mutator Methods
  • public void setName(String newName)
  • public void setHired(Date newHired)
  • Class encapsulates the data structure and
    operations of the object.
  • Internals are hidden from the user.
  • User only knows available methods and how to call
    them.

10
Object-Oriented Concepts Inheritance
Polymorphism
  • Inheritance - A class (subclass) can inherit the
    characteristic of another class (superclass).
  • Example Employee has inherited attributes and
    methods from Person.
  • Polymorphism - Each subclass object can respond
    differently to same message by overriding the
    superclass method. Example

11
Object-Oriented Concepts Object Identifier
  • Object Identifier (OID) The unique OID is
    maintained by the DBMS.
  • ODBMS - Generated automatically by the system.
    Example Reference to Date object in the Employee
    object for the date hired.
  • RDBMS Primary key. Example SSN for Employee

12
ODBMS Advantages
  • Matches the object-oriented application design
  • Reduces code, execution time and paging
  • Real world data model
  • Easier Navigation
  • Allows reusability of objects generic objects
    can be used in many applications.
  • Manages Complex data types more efficiently.
  • Supports distributions of data across networks
    more efficiently.

13
ODBMS Disadvantages
  • Still developing
  • Lack of accepted standards
  • Lack of development tools.
  • Change is more likely to occur in model
  • More complicated than the relational model.
    Takes longer to learn.
  • Not as efficient when data and relations are
    simple.

14
Java ODB Example
  • import org.odmg.
  • import java.util.Collection
  • Implementation impl new com.vendor.odmg.Implemen
    tation()
  • Database db impl.newDatabase()
  • Transaction txn impl.newTransaction()
  • try
  • db.open("addressDB", Database.OPEN_READ_WRITE)
  • txn.begin()
  • // perform query
  • OQLQuery query new OQLQuery(
  • "select x from Person x where x.name
    \S. M. Lee\"")
  • Collection result (Collection)
    query.execute()
  • Iterator iter result.iterator()
  • // iterate over the results
  • while ( iter.hasNext() )
  • Example of how to access data in an ODB, using
    the ODMG Object Query Language (OQL)
  • Opens DB
  • Starts a transaction
  • Executes a query to find a Person object named
    S. M. Lee
  • Does additional processing on this Person object
  • Gets Address object of Person
  • Update street of Address object
  • Commit transaction
  • Close database

Source http//www.service-architecture.com/object
-oriented-databases
15
Conclusion
  • Definition
  • Persistent Programming Languages
  • Object-Oriented Concepts
  • Advantages and Disadvantages of ODBMS
  • Example Code
Write a Comment
User Comments (0)
About PowerShow.com