ADBMS Chapter 5
ADBMS Chapter 5
Object Relational
Databases
Chapter 5
Pravicha.M.T
Introduction
Object-Oriented databases are now referred to
as Object Databases (ODB) (previously
called OODB).
• Semantic Overloading
– Has only one construct to represent data and
relationships between data.---relations
– There is no methods to represent has, owns,
manages relationships
• Limited Operations
– Tuple oriented operations. No new operations can be
defined.
– For e.g: if GIS application uses points,
lines,polygons....& Needs operation for
distance,intersection,....But SQL does not allow.
Limitations of Relational
Databases
• Homogenous Data Structure
– Horizontal and vertical homogeneity
– Intersection of row and column must be an atomic
value.
– Too restrictive to real world objects that have complex
structures
Select name
From products
Query Returns
OQL SQL
Object Tuple
Collection of Table
objects
SQL3 “Object-oriented
SQL”
Foundation for several OO database management
systems – ORACLE8, DB2, etc
New features – “Relational” & “Object oriented”
Relational Features – new data types, new
predicates, enhanced semantics, additional
security and an active database
Object Oriented Features – support for functions
and procedures.
Object Relational DBMS
Problems with RDBMS
• Restricted built in datatypes (Numbers and strings)
• Structural shortcomings(flat and do not support
nested structures)
• Do not take advantage of OO approaches
Lead to OODBMS
Example
CREATE TYPE EMP_TYPE AS OBJECT (
empNo NUMBER,
empName VARCHAR2(200),
Address_obj Address_T,
PhoneList_var Phone_T,) NOT FINAL;
Object Relational DBMS
E.g:2
) UNDER Emp_type;
User defined Data Types
I. Creating a “type”
Example:
Creating “Table”
• CREATE TABLE PERSON OF PERSON_TYPE
• CREATE TABLE STUDENT OF
STUDENT_TYPE
UNDER PERSON;
General Way of
Classification
Relational DBMS Object-
Query Relational DBMS
location point);
Implementation (contd.)
select P.id