Object Oriented Databases
Group 5
RKSK Ekanayaka (8853)
W Dilhan (8855)
MMCK Bandara (8863)
WBR Madusala (8864)
JPS Mihiranga (8887)
11/3/2014 Object Oriented Database
Outline
Introduction
Introduction to Object-Oriented
Programming
Overview of Object Oriented
Databases
Advantages of OODBS
Disadvantages of OODBS
Object Query Language (OQL)
Summary
11/3/2014 Object Oriented Database
Introduction
An integration of database capabilities with an object
oriented programming language.
Object-oriented databases are designed to work well with
object-oriented programming.
ODBMSs provide the lowest cost for development and best
performance.
Relational database technology has failed to handle the needs
of complex information systems.
11/3/2014 Object Oriented Database
Introduction to Object-
Oriented Programming
OOP views programs as sets of data structures that have
both data elements and program instructions.
traditional programming is organized around logic first
and data second, whereas OOP is organized around data
first and logic second.
When developing an object-oriented program,
Identify the objects involved
Design those objects as data elements and programs
Finally, a flowchart or pseudo code would be created
11/3/2014 Object Oriented Database
Overview of Object Oriented
Databases
An OODB combines object oriented
programming principles with database
management principles.
Object oriented programming concepts such as
encapsulation, polymorphism and inheritance are
enforced as well as database management concepts
such as the ACID properties (Atomicity,
Consistency, Isolation and Durability) which lead to
system integrity, and secondary storage
management systems which allow for managing
very large amounts of data.
11/3/2014 Object Oriented Database
Advantages of OODBS
integrated with programming
language.
Automatic method storage (when
available)
User-defined types.
11/3/2014 Object Oriented Database
Disadvantages of OODBS
ODBMS requires object-oriented
programming.
Converting data to an ODBMS is very
expensive.
ODBMS do not provide effective query
and reporting tools.
11/3/2014 Object Oriented Database
Object Query Language (OQL)
Declarative query language
Not computationally complete
Syntax based on SQL (select, from,
where)
Additional flexibility (queries with user
defined operators and types)
11/3/2014 Object Oriented Database
Example of OQL query
The following is a sample query
“what are the names of the black product?”
Select distinct p.name
From products p
Where p.color = “black”
Valid in both SQL and OQL, but results are
different.
11/3/2014 Object Oriented Database
Result of the query (SQL)
Original table
Product no Name Color
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 Mercedes SLK Black
Result
- The statement queries a
Name relational database.
Ford Mustang => Returns a table with rows.
Mercedes
SLK
11/3/2014 Object Oriented Database
Result of the query (OQL)
Original table
Product no Name Color
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 Mercedes SLK Black
Result - The statement queries a
object-oriented database
String String
=> Returns a collection of
Ford Mustang Mercedes SLK
objects.
11/3/2014 Object Oriented Database
Summary
Object-oriented programming is a new style of
programming that has emerged in the last 10 years. It
has substantial advantages over traditional
programming, and many companies have standardized
on it for their new applications. An object DBMS
(ODBMS) provides for object storage.
At present, ODBMS are not frequently used in
commercial environments because most
organizational data are in relational format. Also,
ODBMS lack some essential features.
11/3/2014 Object Oriented Database
11/3/2014 Object Oriented Database