1. Obj t O i t d D t bObject Oriented Databases
Group 5Group 5
RKSK Ekanayaka (8853)
W Dilhan (8855)( )
MMCK Bandara (8863)
WBR Madusala (8864)
JPS Mihiranga (8887)
Object Oriented Database11/3/2014
2. O tliOutline
Introduction
Introduction to Object-OrientedIntroduction to Object Oriented
Programming
Overview of Object Oriented DatabasesOverview of Object Oriented Databases
Advantages of OODBS
Disadvantages of OODBSDisadvantages of OODBS
Object Query Language (OQL)
SummarySummary
Object Oriented Database11/3/2014
3. I t d tiIntroduction
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.
Object Oriented Database11/3/2014
4. Introduction to Object-j
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 secondfirst and logic second.
When developing an object-oriented program,
Id tif th bj t i l dIdentify the objects involved
Design those objects as data elements and programs
Finally, a flowchart or pseudo code would be created
Object Oriented Database11/3/2014
5. Overview of Object Orientedj
Databases
An OODB combines object oriented
programming principles with database
management principles.
Object oriented programming concepts such as
encapsulation, polymorphism and inheritance arep , p y p
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 managementintegrity, and secondary storage management
systems which allow for managing very large
amounts of data.
Object Oriented Database11/3/2014
6. Advantages of OODBS
integrated with programming
language.language.
A t ti th d t ( hAutomatic method storage (when
available)
User-defined types.yp
Object Oriented Database11/3/2014
7. Disadvantages of OODBS
ODBMS requires object-oriented
programming.
Converting data to an ODBMS is very
expensiveexpensive.
ODBMS do not provide effective queryODBMS do not provide effective query
and reporting tools.
Object Oriented Database11/3/2014
8. Object Query Language (OQL)
Declarative query language
Not computationally complete
Syntax based on SQL (select, from,
h )where)
Additional flexibility (queries with user
d fi d d )defined operators and types)
Object Oriented Database11/3/2014
9. Example of OQL query
The following is a sample query
“what are the names of the black product?”what are the names of the black product?
S l t di ti tSelect distinct p.name
From products p
Where p.color = “black”
⇒ Valid in both SQL and OQL, but results are⇒ Valid in both SQL and OQL, but results are
different.
Object Oriented Database11/3/2014
10. Result of the query (SQL)
Product no Name Color
Original table
Product no Name Color
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 Mercedes SLK Black
- The statement queries a
Result
The statement queries a
relational database.
=> Returns a table with rows.
Name
Ford Mustangg
Mercedes SLK
Object Oriented Database11/3/2014
11. Result of the query (OQL)
Product no Name Color
Original table
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 M d SLK Bl kP3 Mercedes SLK Black
- The statement queries aResult
object-oriented database
=> Returns a collection of
bj t
String
Ford Mustang
String
Mercedes SLK
objects.
g
Object Oriented Database11/3/2014
12. Summary
Object-oriented programming is a new style of
programming that has emerged in the last 10 years. It
has substantial advantages over traditionalhas 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 t ODBMS t f tl d iAt 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