12.07.2015 Views

Lecture 33: Object-Oriented Databases

Lecture 33: Object-Oriented Databases

Lecture 33: Object-Oriented Databases

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CSCI403<strong>Lecture</strong> <strong>33</strong>: <strong>Object</strong>-<strong>Oriented</strong> <strong>Databases</strong>


Goal: SimpleProgrammaticPersistence &Retrieval


Using an RDBMS• Save object attributes to tables• Manually• Using an ORM• Challenge: object data must “become” arecord and vice-versa


<strong>Object</strong>-<strong>Oriented</strong>Database SystemsWhy not store objects as objects?


http://tinyurl.com/3zjndzc


What’s an OODB?• It should be a DBMS• Persistence• Storage management• Concurrency• Recovery• Ad hoc query support


What’s an OODB?• Consistent w/ modern OO paradigms• Complex objects• <strong>Object</strong> identity• Encapsulation• Types (classes)• Inheritance• Overriding• Extensibility• Computational completeness


HighlightsAn RDBMS only persists object state.age, nameAn OODB persists state & behavior.age, name, dance(), drink()


HighlightsAn RDBMS manages identificationprimary keys... what does “identity” mean in the OO model?


Who’s Your Daddy?(<strong>Object</strong> Identity vs. <strong>Object</strong> Equality)Person{ name: Jack,age: 40,son: Person { name: John, age:15}}Person{ name: Diane,age: 32,son: Person { name: John, age:15}}


OODBs & Identity• Identity is achieved through a graph• Transparent• Works great for a single application session• Identity is achieved through ID generation• Managed internally by the OODB• Roughly similar to primary keys


Why an OODB?• Composite objects & relationships• Preserves class hierarchy (no STI)• No formal query language necessary• No “impedance mismatch”• One data model


Why Not?• Sensitive to schema changes• Language / API dependent• Limited ad-hoc queries(All of these issues have evolved and aredependent on the OODB being used)


Example


Homework• Read “An Exploration of <strong>Object</strong> <strong>Oriented</strong>Database Management Systems” (Obasanjo)• Read “The <strong>Object</strong>-<strong>Oriented</strong> Database SystemManifesto” (Atkinson et al)• http://developer.db4o.com/Documentation.aspx

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!