0% found this document useful (0 votes)
137 views17 pages

OODB vs RDB: Data Models Explained

The document compares and contrasts object-oriented databases (OODB) and relational databases (RDB). OODB stores data as objects that are instances of classes, allowing for real-world modeling. RDB uses tables, rows, and columns and allows 1:1, 1:M, and M:N relationships between tables. Both models have advantages like simplicity and querying capabilities, but OODB lacks SQL and constraints while RDB has overhead and can promote isolated data "islands".

Uploaded by

Ammar Siddiqi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views17 pages

OODB vs RDB: Data Models Explained

The document compares and contrasts object-oriented databases (OODB) and relational databases (RDB). OODB stores data as objects that are instances of classes, allowing for real-world modeling. RDB uses tables, rows, and columns and allows 1:1, 1:M, and M:N relationships between tables. Both models have advantages like simplicity and querying capabilities, but OODB lacks SQL and constraints while RDB has overhead and can promote isolated data "islands".

Uploaded by

Ammar Siddiqi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1

Dr. Abid Sohail Bhutta


abidbhutta@cuilahore.edu.pk
Department of Computer
Science,
COMSATS University , Lahore
Campus
Database Systems
Lecture 7
Object Orientated Data Model (OODB)
and Relational Data Model (RDB)
Recall Lecture 6

 HDBS (Hierarchical)
 NWDB (Network)

4
OBJECT-ORIENTED
DATABASE (OODB)
 The ODBMS which is an abbreviation
for object oriented database management
system, is the data model in which data is
stored in form of objects, which are instances
of classes. These classes and objects
together makes an object oriented data
model.

5
OODB a simpler Example

class CLERK
{
//variables
char name;
string address;
int id; int salary;
//messages
char get_name();
string get_address();
int annual_salary();
};
6
Data Object in OODB

{
"_id" : "37010"
"city" : "ADAMS",
"pop" : 2660,
"state" : "TN",
“councilman” : {
name: “John Smith”
address: “13 Scenic Way”
}
}

7
OODB Data Object
book = {
title: “DBMS: The Definitive Guide",
authors: [ "Kristina Chodorow", "Mike Dirolf" ]
published_date: ISODate("2010-09-24"),
pages: 216,
language: "English",
publisher: {
name: "O’Reilly Media",
founded: "1980",
location: "CA"
}

8
Array of Data Objects
{
"anObject": {
"numericProperty": -122,
"stringProperty": "An offensive \" is problematic",
"nullProperty": null,
"booleanProperty": true,
"dateProperty": "2011-09-23"
},
"arrayOfObjects": [
{
"item": 1
},
{
"item": 2
},
{
"item": 3
}
],
"arrayOfIntegers": [
1,
2,
3,
4,
5
]
}

9
Advantages and Disadvantages

 Advantages
 Real world modeling
 Model simplicity
 Reduced data size
 Advantages
 Lack of SQL query language
 Lack of automotive constraints

10
Relational Database Model (RDBM)

 Let’s user or database designer to operate


human logical environment
 Perceived by user as a collection of tables for
data storage, while let RDBMS handles the
physical details.
 Tables are a series of row/column intersections
 Tables related by sharing common entity
characteristics
 It allows 1:1, 1:M, M:N relationships
Relational Database Model
Relational Database Model

 Advantages
 Structural independence: data access path is
irrelevant to database design; change structure will
not affect the database
 Improved conceptual simplicity
 Easier database design, implementation,
management, and use
 Ad hoc query capability with SQL (4GL is added)
 Powerful database management system
Relational Database Model

 Disadvantages
 Substantial hardware and system software
overhead
 Poor design and implementation is made
easy
 May promote “islands of information”
problems
Data Models
 Object-based
 Entity-relationship
 Semantic
Knowledge-based
 Functional
 Object-oriented
 Record-based (transactions) Object-relational
 Relational
 Network Transaction-based
 Hierarchical
 Physical
How data are stored
 Unifying
 Frame memory
Summary -Record-Based Data Models
 Relational (Oracle, DB2, Sybase, Informix, SQL
7, Ingres, etc.)
 Based on concepts of mathematical relations
 Tables, rows, columns
 Network (CODASYL - Conference on Data
System Languages) (Image)
 Many-to-many relationships
 Record types, data items
 Hierarchical (IMS)
 Segment types, fields
In COBOL: files, records, fields

You might also like