Object Oriented Databases
John Van Hemert, 3/2006
Introduction
Object-oriented databases are a relatively new strategy for data storage. Certain applications, like Medical Informatics and related fields, gain little from the the use of relational databases, so computer scientists are forced to develop new paradigms for handling data. This chapter is an overview of object databases. It is meant to be read with an application like medical coding or genetic data in mind. Students should recognize that this is an excellent direction for individual research and discovery.
What is a database system?
A database system is a coordinated package of software that manages structured data. It provides the following:
- Application generality
- Efficient data access
- Security
- Data consistency
- Resilience
- Concurrency control
- Multiple views
- User Interfaces
- Integrity
- Distribution
(Cooper, Richard. 1997. Object Databases: An ODMG Approach. International Thomson Computer Press. Boston, MA.)
Within these parameters, a database system can take the form of any paradigm created by human ingenuity.
Record Based Database Systems
Two record based database systems are the network database and the relational database. While the network database uses circular linked lists and the relational database uses a table-like structure, both are based upon records, or tuples.
A Network Database Schema
Shortcomings of Record Based Database Systems
Data modeling
Record based databases are overly simplified. They stem from our tendency to draw simple tables and link them together. The world is, however, much more complex than any table or record can represent.
Complex Computation
Applications like Medical Informatics need to perform complex computation of the data stored in databases. This requires embedding a database oriented language within a normal programming language, creating what is called impedance mismatch.
Integrating computation and data
When computation is performed on a record based database, there is no way of storing the code for the compuation within the database. It must be stored externally in the filesystem. (Cooper, 1997)
What Object Orientation Brings to Database Systems
- Object identity
- Classification
- Encapsulation
- Information hiding
- Inheritance
- Overriding
(Cooper, 1997)
The Object Data Management Group data model
"The ODMG data model describes a database as a collection of denotable objects and literals." (Cooper, 1997) This means an object database can be viewed as simply and broadly or complex and specific as needed, just like the real world. An object, in the ODMG database system, consists of the following components:
- Name
- Supertypes
- Extent (system-mainained)
- Keys (for associative access)
- Attributes (other objects or literals)
- Relationships to other objects
- Operations
(Cooper, 1997)
The Object Definition Language
Classes are defined using the ODL. Here is an example:
interface Person
attribute String socialSecurityNumber;
attribute String name;
attribute Unsigned short age;
attribute Address address
(Cooper, 1997)
The Object Query Language
OQL can be used as the traditional select ... from ... where syntax, but can also be incorporated into more complex algorithms seemlessly. It is used similarly to the way objects are manipulated in any object oriented projramming language. For example,
- olderPerson = aPerson.age + 4;
- pets = cats union dogs;
- for all U in Users: U.login();
- select state.name from state in America where state.size > iowa.size;
The object oriented approach to data storage can be helpful in many complex applications, such as Medical Coding and Genetics. No matter how appropriate a system is for a certain application, data manipulation is paramount.
Further Exploration
Object Database vs. Object-Relational Databases, by Steve McClure
An Exploration of Object Oriented Database Management Systems, by Dare Obasanjo
Construct a frontend to translate between Java objects and relational database records, by Merlin Hughes and Michael Shoffner
ODBMS for RDBMS Users, by Rick Grehan
db4objects, an opensource OODBMS