1 / 32

Object-Oriented Database Development

Object-Oriented Database Development. Why ODBMS?. RDBMS are effective for business application Limitations for storing and manipulating complex data and relationships Due to the complexity

faxon
Download Presentation

Object-Oriented Database Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object-Oriented Database Development

  2. Why ODBMS? • RDBMS are effective for business application • Limitations for storing and manipulating complex data and relationships • Due to the complexity • Popularity of Object Oriented Programming along with Object Oriented Design, which has replaced the Structured Programming/Structured Design Methodology • Enter ODBMS

  3. Object Model • Proposed by Object Database Management Group (ODMG) – www.odmg.org • For developing logical schemas • Object Definition Language (ODL) • A data definition language for OODBs • Map conceptual UML class diagrams into logical ODL schemas • Map classes, attributes, operations, association relationships, and generalization relationships from a UML class diagram into corresponding ODL constructs • Object Query Language (OQL) is equivalent to DML portion of SQL

  4. Object Definition Language (ODL) • Corresponds to SQL’s DDL (Data Definition Language) • Specify the logical schema for an object-oriented database • Based on the specifications of Object Database Management Group (ODMG)

  5. Defining Classes • UML class diagram for a college database. Belongs to Takes Taken By Offers Has Prereqs Is Prereqs for

  6. Defining Student Class class Student { attributestring name; attributedate dateOfBirth; attributestring address; attributestring phone; // relationships and operations } • class – keyword for defining classes • attribute – keyword for attributes • operations – return type, name, parameters in parentheses • relationship – keyword for establishing relationship

  7. Defining Course • UML class diagram for a college database. Class Course { attributestring crse_code; attributestring crse_title; attributeshort crse_hrs; // Relationships & operations }

  8. Defining an Attribute • Value can be either: • Object identifier (variable) or Literal (constant) • Types of literals • Atomic literal– a constant that cannot be decomposed into components e.g.) integer, float, string, char, bool, short, long • Collection – multiple literals or object types See Next Slide • Structure – a fixed number of named elements, each of which could be a literal or object type • Structured literal – a fixed number of named elements, each of which could be a literal or object type • Attribute ranges • Allowable values for an attribute • Enum: for enumerating the allowable values

  9. Kinds of Collections • Set – unordered collection without duplicates • Bag – unordered collection that may contain duplicates • List – ordered collection, all the same type • Array – dynamically sized ordered collection, locatable by position • Dictionary – unordered sequence of key-value pairs without duplicates

  10. Defining Structures Structure = user-defined type with components struct keyword Example: struct Address { Stringstreet_address; String city; String state; String zip; };

  11. Defining Operations • Return type • Name • Parentheses following the name • Arguments within the parentheses

  12. Defining Relationships • Only unary and binary relationships allowed • Relationships are bi-directional • implemented through use of inverse keyword • ODL relationships are specified: • relationship indicates that class is on many-side • relationship set indicates that class is on one-side and other class (many) instances unordered • relationship list indicates that class is on one-side and other class (many) instances ordered

  13. UML class diagram for a college database The following slides illustrate the ODL implementation of this UML diagram

  14. ODL Schema for college database

  15. ODL Schema for college database (cont.) class keywordbegins the class definition.Class components enclosed between { and }

  16. attribute has a data type and a name ODL Schema for college database (cont.) specify allowable values using enum

  17. ODL Schema for college database (cont.) extent = the set of all instances of the class

  18. ODL Schema for college database (cont.) Operation definition: return type, name, and argument list. Arguments include data types and names

  19. ODL Schema for college database (cont.) relationship sets indicate 1:N relationship to an unordered collection of instances of the other class inverse establishes the bidirectionality of the relationship

  20. ODL Schema for college database (cont.) relationship list indicates 1:N relationship to an ordered collection of instances of the other class

  21. ODL Schema for college database (cont.) relationship indicates N:1 relationship to an instance of the other class

  22. Creating Object Instances • Specify a tag that will be the object identifier • MBA699 course (); • Initializing attributes: • Cheryl student (name: “Cheryl Davis”, dateOfBirth:4/5/77); • Initializing multivalued attributes: • Dan employee (emp_id: 3678, name: “Dan Bellon”, skills {“Database design”, “OO Modeling”}); • Establishing links for relationship • Cheryl student (takes: {OOAD99F, Telecom99F, Java99F});

  23. Querying Objects in the OODB • Object Query Language (OQL) • ODMG standard language • Similar to SQL-92 • Some differences: • Joins use class’s relationship name: • Select x.enrollment from courseofferings x, x.belongs_to y where y.crse_course = “MBA 664” and x.section = 1; • Using a set in a query • Select emp_id, name from employees where “Database Design” in skills;

  24. Current ODBMS Products • Rising popularity due to: • CAD/CAM applications • Geographic Information Systems • Multimedia • Web-based applications • Increasingly complex data types • Applications of ODBMS • Bill-of-material • Telecommunications navigation • Health care • Engineering design • Finance and trading • Airline reservation

  25. ODBMS products

  26. Brief History of ODBMS : Early 1980s- The beginning - • Won Kim at MCC (Microelectronics and Computer Technology Corporation) in Austin, Texas, begins a research project on ORION. • Two products will later trace their history to ORION: ITASCA (no longer around) and Versant.

  27. Brief History of ODBMS : Late 1980s- First wave of commercial products - • A Lisp-based system, Graphael, appears from the French nuclear regulatory efforts. Eventually, Graphael goes through a re-write and becomes Matisse. • Servo-Logic begins work on GemStone. Servo-Logic is now GemStone Systems. • Start of O2 development at INRIA (France). The founder of O2 is Francois Bencilhon, also from MCC. • Tom Atwood at Ontologic produced Vbase, which supports the proprietary language COP (for C Object Processor). COP is eventually eclipsed by C++, Ontologic becomes ONTOS, and the database is rewritten to support C++. • Atwood left Ontologic in the late 1980s and founded Object Design (now part of Progress Software) with ObjectStore (based on C++). • Objectivity/DB product by Objectivity - Drew Wade

  28. 1991 – ODMG • Rick Cattell (SunSoft) initiates the ODMG with 5 major OODBMS vendors. • The first standard, ODMG 1.0, was released in 1993. • ODMG OQL (object query language), which influenced SQL:1999

  29. 1990s - First Growth Period • Market for commercial ODBMS products grows to some $100M, peaks in 2000 and shrinks since

  30. 2001 - Final ODMG 3.0 standards released • A final ODMG 3.0 standards is released. • Shortly thereafter, the ODMG submits the ODMG Java Binding to the Java Community Process as a basis for the Java Data Objects (JDO) Specification. • Afterwards, the ODMG disbands

  31. 2004 - Advent of Open Source • db4o released as free, open source ODBMS. • In November 2005, db4o is first to implement Native Queries as an object oriented data access API that relies entirely on the programming language (Java/C#) • Most persistence architectures for Java and .NET provide interfaces to execute queries written in an architecture-specific query language. • The queries are not accessible to development environment features like compile-time type checking, auto-completion, and refactoring. Programmers must work in two languages: the implementation language and the query language. • Native Queries, a concise and type-safe way to express queries directly as Java and C# methods. We describe the design of Native Queries and provide an overview of implementation and optimization issues. • Native Queries for Persistent Objects By William Cook, Carl Rosenberger

  32. So, now what? • Much enthusiasm when introduced • There was a mismatch between the technology and reality • RDBMS had entrenched as the de facto DBMS • Commercially available but only a small fraction of the market • Due to the de facto programming paradigm, OOP, ODBMS effort will pick up but more in the open source environment.

More Related