object oriented database by liem do and jesslyn bui

Post on 16-Jan-2016

228 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Object Oriented Database

By Liem DoAnd Jesslyn Bui

History of Databases

File Systems (1950s)

hierarchical/ network (1960s) relational (1970-80s) 

ODBMS (1990s-today)

Store data after process created it has ceased to exist

 Concurrency, recovery  Complex structures , fast access

More reliability, less redundancyMore flexibility, multiple views 

Better simulation, more and complex data types, more relationships (e.g.aggregation, specialization)  Single language for database AND

programming, no 'reconstruction' of objects 

OBJECT-ORIENTED DATABASES

What is an Object Oriented Database?Comparison with traditional DatabasesAdvantagesDisadvantagesCode ExampleMyths about Object Oriented DatabasesCommercial ODBMS availableReal Life uses of ODBMS in Industry

What is Object Oriented Database (OODB)?

OODB = Object Orientation + Database Capabilities

Provides data and object persistenceRepresentation of complex data modelsIntegrates database capabilities with object programming language capabilites

Transparent persistence

Complex data

Complex data is often characterized by:

A lack of unique, natural identification. A large number of many-to-many

relationships. Access using traversals. Frequent use of type codes such as those

found in the relational schema

Database Models

ObjectRelational Object Relational

Object Model

Three concepts are critical

to understanding object models. They are:

Data abstractionEncapsulationInheritance

Relational Model

Comparison

Mapping

Comparison of object and relational terminology

Relational Database of a Cat

Object-Oriented Database of a Cat

OODB enables complex data types to be stored (e.g. CAD applications)

Object Relational Model

It handles the mapping and has a cache much like an ODBMS.

Data is mapped to the ODBMS and from the ODBMS based on the application needs.

The ODBMS provides high-speed performance for the Internet.

Advantages

Uses object oriented features for data storage.

Provides transparent object persistence

Allows ability to store complex data

High performanceSingle data model

Disadvantages

Lack of FamiliarityInertiaTechnology FearBusiness Fear

Java Code Example

import org.odmg.*;import java.util.Collection;Implementation impl = new com.vendor.odmg.Implementation();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

= \"Doug Barry\""); Collection result = (Collection) query.execute(); Iterator iter = result.iterator(); // iterate over the results while ( iter.hasNext() ) {

Person person = (Person) iter.next(); // do some addition processing on the person (now shown) // now traverse to the address object and update its value

person.address.street = "13504 4th Avenue South";

} txn.commit(); db.close();

}

Has a steep learning curve Slow Do not support queries Do not scale

Myths about OODB

Commercial ODBMS Available

Objectivity ObjectStore Goods Versant

Real Life uses of ODBMS in Industry

trade stock use Internet trade use your pager use your voicemail book a flight use your PCS phone

top related