1 / 13

Objects

Objects. History Simula - 1960’s Smalltalk - 1970’s C++ - 1980’s Java - 1990’s Market OODBMS = $100M (Objectstore, Versant, Gemstone, O2, Objectivity, Poet) RDBMS = $4.5B (Oracle, Sybase, Informix, Microsoft, IBM). An object is a data structure. Data Behavior

Download Presentation

Objects

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. Objects • History • Simula - 1960’s • Smalltalk - 1970’s • C++ - 1980’s • Java - 1990’s • Market • OODBMS = $100M (Objectstore, Versant, Gemstone, O2, Objectivity, Poet) • RDBMS = $4.5B (Oracle, Sybase, Informix, Microsoft, IBM)

  2. An object is a data structure... • Data • Behavior • what operations the object can perform • how it responds to messages from other objects

  3. OO Environment Message A Message B Method 1 Method 3 Data Data Method 5 Method 4 Method 2 Message C

  4. OO Features • Complex objects • Identity • Encapsulation • Classes • Inheritance • Extensibility • Polymorphism Object Class Attributes Methods

  5. Object Oriented Databases • Object • unique system generated object identifier • collection of procedures • regular data attributes • Messages • Encapsulation • Classes • Hierarchy • Inheritance • Polymorphism

  6. Object Oriented Databases • Extensibility • Integer, Real, String, Date, Char, Boolean • Tuple, Set, List, Array, Bag • Image, Audio, Video • User Defined Abstract Data Types (!) • Persistence • Object state is implicitly saved

  7. Object Behavior • Methods • objects are self-contained • supports object independence (private/public) • Msg: person.new person.firstName(“Chuck”) person.age return(year(today - birthdate))

  8. Polymorphism • Object methods can have the same name and similar behavior, or same name and different behavior. • Example - computeYearlyEarnings • non-union vs. union employee

  9. Querying OODBMS • Consider the table: • Person{LastName,Spouse,Mother,Father} • Find “David Jordan's” wife's mother's father (Grandfather in law?)

  10. In SQL select f.last_name from Person me, Person sp, Person m, Person f where me.first_name = "David' and me.last_name = "Jordan" and me.spouse = sp.personId and sp.mother = m.personId and m.father = f.personId

  11. In OQL David_Jordan->Spouse->Mother->Father->LastName

  12. Another Example list of all the last names in the database that were not "Smith" or "Jones": OQL: select distinct LastName from Persons where LastName != "Smith" and LastName!= "Jones" SQL: select distinct LastName from Persons where LastName <> "Smith" and LastName <> "Jones"

  13. When to use an OODBMS? • If the requirements analysis lends itself to object design, and the development language is object-oriented, then • If the data is not already stored in an RDBMS, then use OODBMS • Else, use O/RDBMS.

More Related