









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Product DB
manipulates persistent data in a database.
management. No translation from database to
application programming needed.
approach.
Application
containing:
Variables
Methods
Employee SSN:int Name:String Hired:Date Salary:double … getSSN() getName() setName() …
Relationships
Inheritance & Polymorphism
characteristic of another class (superclass).
methods from Person.
differently to same message by overriding the superclass method. Example:
Person
Employee Supplier Customer
Subclass
Superclass
Identifier
maintained by the DBMS.
Example: Reference to Date object in the Employee object
for the date hired.
Employee Date
an ODB, using the ODMG Object Query Language (OQL):
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 = \“S. M. Lee""); 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(); } //exception handling would go here ... Source: http://www.service-architecture.com/object-oriented-databasesDocsity.com