Object Oriented Databases: Concepts, Models, Systems, and db4o Example
VerifiedAdded on 2023/04/07
|10
|1684
|422
Report
AI Summary
This report provides an introduction to object-oriented databases (OODBs), contrasting them with traditional relational databases and highlighting their suitability for handling complex data types in applications like CAD/CAM and multimedia repositories. It covers core object-oriented concepts such as objects, object identity (OID), methods, abstract data types (ADTs), and inheritance, explaining how these concepts are implemented in object data models (ODMs). The report also discusses object-relational database systems as a bridge between relational and object-oriented paradigms. Furthermore, it details the characteristics of object-oriented database management systems (OODBMS), including the thirteen rules that define an OODBMS, and provides a practical example of creating, storing, querying, updating, and deleting objects using the db4o object database. The document emphasizes the integration of conventional DBMS features with the powerful modeling capabilities of object-oriented programming, making it a valuable resource for understanding OODBs. Desklib provides solved assignments and study resources for students.

Object Oriented Databases
Introduction
Object Oriented database frameworks bolster a little accumulation of information sorts (whole
numbers, dates, string, singe), which has demonstrated satisfactory for customary applications,
for example, authoritative information handling. In numerous application spaces in any case,
substantially more mind boggling sorts of information must be dealt with. Cases of areas with
complex information incorporate PC Aided outline (CAD/CAM), interactive media vaults and
report administration. These information are put away in OS document frameworks or specific
information structures as opposed to in a DBMS. To bolster such applications, a DBMS must
bolster complex information sorts. Question arranged ideas emphatically affected endeavors to
upgrade database bolster for complex information and prompted to the improvement of protest
situated frameworks.
The question situated frameworks have created along two particular ways;
Object-situated Database Systems: these are proposed as an other option to social frameworks
and are gone for application spaces where complex items assume a focal part. The approach is
vigorously affected by protest arranged programming dialects and can be comprehended as an
endeavor to add DBMS usefulness to a programming dialect condition. The Object Database
Management Group (ODMG) has built up a standard Object Data Model (ODM) and Object
Query Language (OQL), which are what might as well be called the SQL standard for social
database frameworks.
Object-Relational Database Systems: This can be considered as an endeavor to broaden social
database frameworks with the usefulness important to bolster a more extensive class of
utilizations and from multiple points of view give a scaffold between the social and protest
Introduction
Object Oriented database frameworks bolster a little accumulation of information sorts (whole
numbers, dates, string, singe), which has demonstrated satisfactory for customary applications,
for example, authoritative information handling. In numerous application spaces in any case,
substantially more mind boggling sorts of information must be dealt with. Cases of areas with
complex information incorporate PC Aided outline (CAD/CAM), interactive media vaults and
report administration. These information are put away in OS document frameworks or specific
information structures as opposed to in a DBMS. To bolster such applications, a DBMS must
bolster complex information sorts. Question arranged ideas emphatically affected endeavors to
upgrade database bolster for complex information and prompted to the improvement of protest
situated frameworks.
The question situated frameworks have created along two particular ways;
Object-situated Database Systems: these are proposed as an other option to social frameworks
and are gone for application spaces where complex items assume a focal part. The approach is
vigorously affected by protest arranged programming dialects and can be comprehended as an
endeavor to add DBMS usefulness to a programming dialect condition. The Object Database
Management Group (ODMG) has built up a standard Object Data Model (ODM) and Object
Query Language (OQL), which are what might as well be called the SQL standard for social
database frameworks.
Object-Relational Database Systems: This can be considered as an endeavor to broaden social
database frameworks with the usefulness important to bolster a more extensive class of
utilizations and from multiple points of view give a scaffold between the social and protest
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

situated worldview. The SQL: 1999 standard stretches out SQL to join bolster for the Object
social model of information.
Object orientation
Object orientation is a demonstrating and advancement strategy in view of question situated
(OO) ideas. It is an arrangement of outline and advancement standards in view of PC structures
called objects. Each protest speaks to a genuine element with the capacity to follow up on itself
and cooperate with different items. OO ideas originate from protest arranged programming
(OOP) which was produced as a contrasting option to customary programming strategies. OOP
ideas initially showed up in Ada, ALGOL, LISP, SIMULA which set the phase for the
presentation of more refined OO ideas. Smalltalk, C++ and Java are more well known OOPLs.
Question Oriented Concepts
Objects: Components and Characteristics
In OO frameworks all that we manage is a protest eg. Understudy, receipt, plane, worker, a
report and so forth. An Object is a dynamic portrayal of true substance that has remarkable
character, installed properties and the capacity to interface with different protests and follow up
on itself.
Object Identity
Question personality is one of a kind character for every autonomous protest put away in the
database. It is spoken to by a question ID (OID) which is one of a kind to each protest and is
alloted by the framework right now of the protest creation. The OID can't be changed under any
conditions.
Contrast between Primary key with an OID
social model of information.
Object orientation
Object orientation is a demonstrating and advancement strategy in view of question situated
(OO) ideas. It is an arrangement of outline and advancement standards in view of PC structures
called objects. Each protest speaks to a genuine element with the capacity to follow up on itself
and cooperate with different items. OO ideas originate from protest arranged programming
(OOP) which was produced as a contrasting option to customary programming strategies. OOP
ideas initially showed up in Ada, ALGOL, LISP, SIMULA which set the phase for the
presentation of more refined OO ideas. Smalltalk, C++ and Java are more well known OOPLs.
Question Oriented Concepts
Objects: Components and Characteristics
In OO frameworks all that we manage is a protest eg. Understudy, receipt, plane, worker, a
report and so forth. An Object is a dynamic portrayal of true substance that has remarkable
character, installed properties and the capacity to interface with different protests and follow up
on itself.
Object Identity
Question personality is one of a kind character for every autonomous protest put away in the
database. It is spoken to by a question ID (OID) which is one of a kind to each protest and is
alloted by the framework right now of the protest creation. The OID can't be changed under any
conditions.
Contrast between Primary key with an OID

As opposed to OID an essential key depends on client given estimations of chose properties and
can be changed whenever. The OID is doled out by the framework, does not rely on upon the
items quality values and can't be changed. The OID can be erased just if the protest is erased, and
that OID can never be reused.
Messages and Methods
A strategy is the code that plays out a particular operation on the items information. Techniques
shield information from immediate and unapproved access by different items.
Each operation performed on a protest must be executed by a strategy. Strategies are utilized to
change the items ascribe values or to give back the estimation of chose question traits.
Techniques speak to genuine activities, for example, changing an understudies' major, adding an
understudy to a course, or printing an understudy name and address. Techniques are what might
as well be called methodology in customary programming dialects. In OO terms, techniques
speak to the articles' conduct.
Each strategy has a name and a body. The body is made out of PC guidelines written in some
programming dialect to speak to a certifiable activity. E.g. to get the region of a circle we can
characterize a technique getArea() that will give back the territory of a circle.
To summon a strategy, a message is sent to the question. A message is sent by indicating a
recipient question, the name of the technique and any required parameters. The inner structure of
Object X
Method 1
Method 4
Method 2
Method 3
Data
can be changed whenever. The OID is doled out by the framework, does not rely on upon the
items quality values and can't be changed. The OID can be erased just if the protest is erased, and
that OID can never be reused.
Messages and Methods
A strategy is the code that plays out a particular operation on the items information. Techniques
shield information from immediate and unapproved access by different items.
Each operation performed on a protest must be executed by a strategy. Strategies are utilized to
change the items ascribe values or to give back the estimation of chose question traits.
Techniques speak to genuine activities, for example, changing an understudies' major, adding an
understudy to a course, or printing an understudy name and address. Techniques are what might
as well be called methodology in customary programming dialects. In OO terms, techniques
speak to the articles' conduct.
Each strategy has a name and a body. The body is made out of PC guidelines written in some
programming dialect to speak to a certifiable activity. E.g. to get the region of a circle we can
characterize a technique getArea() that will give back the territory of a circle.
To summon a strategy, a message is sent to the question. A message is sent by indicating a
recipient question, the name of the technique and any required parameters. The inner structure of
Object X
Method 1
Method 4
Method 2
Method 3
Data
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

the protest can't be gotten to straightforwardly by the message sender (another question). The
capacity to conceal the articles interior points of interest (qualities and strategies) is known as
epitome.
Code:
We can have a class named understudy to store understudy objects. Understudy objects have a
similar structure (properties) and react to similar messages (actualized by strategies). E ach
occurrence of a class is a question with remarkable OID and each protest knows to which class it
has a place.
public student {
private int RegNo;
private String Name;
private String CourseTaken;
private int grade;
Public student (String name, int RegNO){
this.name=name;
this.RegNO =RegNO;
}
public int averageGrade(){
return grade;
}
Public enroll(){
return courseTaken;
}
}
Abstract Data Types (ADT)
An information sort portrays an arrangement of items with comparable qualities. The
arrangement of predefined base information sorts incorporate genuine, whole number, string,
singe which are liable to predefined set of operations. ADT depicts an arrangement of
comparative items. ADT contrasts from routine information sorts in that:
ADT operations are client characterized
ADT epitomizes its definition, along these lines concealing its qualities
Class/Object instances: eg. james, Dirk,
Charles etc
capacity to conceal the articles interior points of interest (qualities and strategies) is known as
epitome.
Code:
We can have a class named understudy to store understudy objects. Understudy objects have a
similar structure (properties) and react to similar messages (actualized by strategies). E ach
occurrence of a class is a question with remarkable OID and each protest knows to which class it
has a place.
public student {
private int RegNo;
private String Name;
private String CourseTaken;
private int grade;
Public student (String name, int RegNO){
this.name=name;
this.RegNO =RegNO;
}
public int averageGrade(){
return grade;
}
Public enroll(){
return courseTaken;
}
}
Abstract Data Types (ADT)
An information sort portrays an arrangement of items with comparable qualities. The
arrangement of predefined base information sorts incorporate genuine, whole number, string,
singe which are liable to predefined set of operations. ADT depicts an arrangement of
comparative items. ADT contrasts from routine information sorts in that:
ADT operations are client characterized
ADT epitomizes its definition, along these lines concealing its qualities
Class/Object instances: eg. james, Dirk,
Charles etc
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

To make theoretical information sort the accompanying must be characterized:
Name (protest name)
Data portrayal or example factors of the items having a place with unique information
sort
ADT operations and imperatives, both of which are actualized through techniques
ADT together with legacy offer help for complex items. A mind boggling item is framed by
consolidating different questions in an arrangement of complex relations. Illustration: a security
framework that utilizations diverse information sorts, for example,
Conventional (forbidden) worker information: name, telephone, DOB
Bitmap information to store worker picture
Voice information to store the worker voice design
Attributes of Object arranged information demonstrate (OODM)
The protest situated ideas speaks to the center attributes of a question arranged information
display (OODM) otherwise called question information demonstrate (ODM). A question
arranged information display must:
Support portrayal of complex articles
Be extensible i.e. must be fit for characterizing new information sorts and also the
operations to be performed on them
Support epitome i.e. the information portrayal and the techniques execution must be
avoided outer substances
Exhibit legacy: a protest must have the capacity to acquire the properties (information
and techniques) of different articles
Support the thought of question character (OID)
Name (protest name)
Data portrayal or example factors of the items having a place with unique information
sort
ADT operations and imperatives, both of which are actualized through techniques
ADT together with legacy offer help for complex items. A mind boggling item is framed by
consolidating different questions in an arrangement of complex relations. Illustration: a security
framework that utilizations diverse information sorts, for example,
Conventional (forbidden) worker information: name, telephone, DOB
Bitmap information to store worker picture
Voice information to store the worker voice design
Attributes of Object arranged information demonstrate (OODM)
The protest situated ideas speaks to the center attributes of a question arranged information
display (OODM) otherwise called question information demonstrate (ODM). A question
arranged information display must:
Support portrayal of complex articles
Be extensible i.e. must be fit for characterizing new information sorts and also the
operations to be performed on them
Support epitome i.e. the information portrayal and the techniques execution must be
avoided outer substances
Exhibit legacy: a protest must have the capacity to acquire the properties (information
and techniques) of different articles
Support the thought of question character (OID)

Comparing OO Data model and ER model
OODM ER Model
Type Entity definition
Object Entity
Class Entity set
Instance variable Attribute
NA Primary Key
OID NA
Method NA
Class hierarchy ER diagram
Question situated Database administration frameworks (OODBMS)
The OODBMS is a database administration framework that incorporates the advantages of
regular database frameworks with the all the more capable demonstrating and computational
qualities of the protest situated information show.
Examples: Commercial: Versant, ObjectDB, Mongo, Gemstone, VOSS, Mercury etc
Open source: db4o, EyeDB, NeoDatis ODB, Ozone, Perst and Zope(ZODB)
Thirteen OODBMS Rules
SET 1: Rules that make it OO System
1. The system must support complex objects
OODBMS
Object Oriented
Features
Conventional
DBMS Features
OO concepts
OO Data Model
OOPL
GUI
Data accessibility
Persistence
Backup & Recovery
Transaction
Concurrency
Security
Administration
OODM ER Model
Type Entity definition
Object Entity
Class Entity set
Instance variable Attribute
NA Primary Key
OID NA
Method NA
Class hierarchy ER diagram
Question situated Database administration frameworks (OODBMS)
The OODBMS is a database administration framework that incorporates the advantages of
regular database frameworks with the all the more capable demonstrating and computational
qualities of the protest situated information show.
Examples: Commercial: Versant, ObjectDB, Mongo, Gemstone, VOSS, Mercury etc
Open source: db4o, EyeDB, NeoDatis ODB, Ozone, Perst and Zope(ZODB)
Thirteen OODBMS Rules
SET 1: Rules that make it OO System
1. The system must support complex objects
OODBMS
Object Oriented
Features
Conventional
DBMS Features
OO concepts
OO Data Model
OOPL
GUI
Data accessibility
Persistence
Backup & Recovery
Transaction
Concurrency
Security
Administration
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

2. Object identity must be supported
3. Objects must be encapsulated
4. The system must support types or classes
5. The system must support inheritance
6. The system must avoid premature binding
7. The system must be computationally complete
8. The system must be extensible
SET 2: Rules that make it DBMS
1. The system must remember data locations
2. System must be able to manage very large databases
3. The system must accept concurrent users
4. The system must be able to recover from hardware and software failures
5. The system must be simple
Creating and storing objects Using db40
Simple example of creating and storing, querying, updating , deleting person objects assume a
normal Person class
public Person {
private String name;
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
3. Objects must be encapsulated
4. The system must support types or classes
5. The system must support inheritance
6. The system must avoid premature binding
7. The system must be computationally complete
8. The system must be extensible
SET 2: Rules that make it DBMS
1. The system must remember data locations
2. System must be able to manage very large databases
3. The system must accept concurrent users
4. The system must be able to recover from hardware and software failures
5. The system must be simple
Creating and storing objects Using db40
Simple example of creating and storing, querying, updating , deleting person objects assume a
normal Person class
public Person {
private String name;
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

public int getAge() {
return age;
}
public String getName() {
return name;
}
...
}
Accessing a Database
ƒ db4o database is an ObjectContainer associated with a specific disc file
ObjectContainer db = Db4o.openFile(<filename>);
try {
// access db
}
finally {
db.close();
}
Creating and Storing Objects
ƒ Create objects as usual and then make them persistent using the set() method on the database
Person p1 = new Person("Fred Kimani", 35);
db.set(p1);
Person p2 = new Person("Mary Jones", 24);
db.set(p2);
return age;
}
public String getName() {
return name;
}
...
}
Accessing a Database
ƒ db4o database is an ObjectContainer associated with a specific disc file
ObjectContainer db = Db4o.openFile(<filename>);
try {
// access db
}
finally {
db.close();
}
Creating and Storing Objects
ƒ Create objects as usual and then make them persistent using the set() method on the database
Person p1 = new Person("Fred Kimani", 35);
db.set(p1);
Person p2 = new Person("Mary Jones", 24);
db.set(p2);

Querying Objects
One option to locate objects is a Query by Example (QBE) approach.ƒCreate a prototypical
object that specifies properties of desired objects
// retrieve by age (null default for string)
Person proto = new Person(null, 35);
ObjectSet<Person> result = db.get(proto);
// retrieve by name (0 default for int)
Person proto = new Person("Mary Jones", 0);
ObjectSet<Person> result = db.get(proto);
// shortcut to retrieve all persons
ObjectSet<Person> result = db.get(Person.class);
Updating Objects
ƒ First retrieve object (or objects), then perform update and then store
// update age of person
// assumes single result to query
ObjectSet<Person> res = db.get(new Person("Mary Jones", 0);
Person p = res.next();
p.setAge(40);
db.set(p);
ƒ Note that the get() and set() methods must be done as two separate stages so prototype object
first used to identify existing object to be updated and then that known object is updated.
Deleting Objects
ƒ As with updating objects, objects must first be retrieved and then deleted
One option to locate objects is a Query by Example (QBE) approach.ƒCreate a prototypical
object that specifies properties of desired objects
// retrieve by age (null default for string)
Person proto = new Person(null, 35);
ObjectSet<Person> result = db.get(proto);
// retrieve by name (0 default for int)
Person proto = new Person("Mary Jones", 0);
ObjectSet<Person> result = db.get(proto);
// shortcut to retrieve all persons
ObjectSet<Person> result = db.get(Person.class);
Updating Objects
ƒ First retrieve object (or objects), then perform update and then store
// update age of person
// assumes single result to query
ObjectSet<Person> res = db.get(new Person("Mary Jones", 0);
Person p = res.next();
p.setAge(40);
db.set(p);
ƒ Note that the get() and set() methods must be done as two separate stages so prototype object
first used to identify existing object to be updated and then that known object is updated.
Deleting Objects
ƒ As with updating objects, objects must first be retrieved and then deleted
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

// delete Fred Bloggs from database
ObjectSet<Person> res = db.get(new Person("Fred Kimani", 0);
Person p = res.next();
db.delete(p);
ObjectSet<Person> res = db.get(new Person("Fred Kimani", 0);
Person p = res.next();
db.delete(p);
1 out of 10

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.