Database Management Systems
Dr. Aman Jatain, Dr. Preeti Rathee, Ms. Ruchika, Ms.
Mansi, Ms. Rishika, Ms. Radhika, Ms. Jyoti, Ms. Megha
Faculty
School of Engineering & Technology(SOET)
K. R. Mangalam University
Objectives
Understand the concept of object-oriented databases
(OODBs).
Learn the characteristics and advantages of OODBs.
Explore the concept of object-relational databases (ORDBs).
Compare OODBs and ORDBs.
Identify applications and use cases of both database types.
Session 4
Object-Oriented and Object-Relational
Databases
Outlook
1. Table of Contents
2. Introduction to Object-Oriented Databases
3. Characteristics of Object-Oriented Databases
4. Advantages and Disadvantages
5. Object-Relational Databases
6. Features of Object-Relational Databases
7. Comparison of OODB and ORDB
8. Applications and Use Cases
9. Summary
[Link]
Introduction
Definition: Databases that integrate object-oriented programming principles
with database technology.
Data is represented as objects, similar to object-oriented programming.
Examples: OODBMS like ObjectDB, db4o.
Object-oriented databases store objects instead of traditional rows and
columns. This approach allows complex data structures and relationships to
be directly represented in the database.
Characteristics of Object-Oriented Databases
1. Encapsulation: Combines data and behaviour into a single entity (object).
2. Inheritance: Reusability of classes and objects.
3. Polymorphism: Ability to define a single interface for multiple
functionalities.
4. Complex Data Types: Supports multimedia, geographic, and CAD data.
5. Persistent Objects: Objects exist beyond the program’s runtime.
These characteristics enable OODBs to handle complex data models more
effectively than traditional relational databases.
Advantages of Object-Oriented Databases
1. Seamless Integration:
o Unified approach with object-oriented programming languages.
2. Complex Data Handling:
o Efficiently manages complex and multimedia data.
3. Increased Productivity:
o Reduces the need for data transformation.
4. Flexibility:
o Supports dynamic schema evolution.
OODBs reduce the impedance mismatch between programming languages
and databases, making development easier and faster.
Disadvantages of Object-Oriented Databases
1. Complexity:
o Steep learning curve for developers.
2. Limited Tools:
o Fewer tools and resources compared to relational databases.
3. Interoperability Issues:
o Lack of standardization.
4. Performance Overhead:
o Can be slower for simple queries.
Despite their advantages, OODBs face challenges that can limit their
adoption in traditional applications.
Introduction to Object-Relational Databases
Hybrid databases that incorporate features of both relational and
object-oriented databases.
Objective:
o Combine the robustness of RDBMS with the flexibility of
OODBMS.
Examples: PostgreSQL, Oracle Database.
Object-relational databases bridge the gap between relational
models and object-oriented programming paradigms, providing
better support for modern applications.
Features of Object-Relational Databases
1. Extended Data Types:
o Support for custom and complex data types.
2. Inheritance:
o Enables subclassing within database schemas.
3. Object Identity:
o Unique identification of objects.
4. Query Language:
o Extensions to SQL for object-oriented features.
ORDBs enhance traditional relational databases by adding features that make
them more adaptable to diverse use cases.
Comparison of OODB and ORDB
Feature OODB ORDB
Relational with
Data Model Object-oriented
objects
Object-oriented
Query Language SQL with extensions
languages
Complexity
High Moderate
Handling
Interoperability Limited Better
While OODBs focus on object-oriented principles, ORDBs aim to balance relational and
object-oriented features for broader compatibility.
Applications of OODB and ORDB
1. OODBs:
o Multimedia applications
o CAD systems
o Scientific databases
2. ORDBs:
o Web applications
o Geographic Information Systems (GIS)
o E-commerce platforms
Each database type excels in specific domains, depending on the complexity
and nature of the data.
Conclusion and Key Takeaway
Object-oriented databases use objects to model data, suitable for
complex data structures.
Object-relational databases blend relational and object-oriented
features.
Both types address modern application needs but differ in
complexity and flexibility.
Test Your Knowledge
1. Which of the following is a key feature of Object-Oriented Databases?
A) Tables and rows
b) Encapsulation and inheritance
c) Normalization
d) Referential integrity
2. What does "persistence" in an object-oriented database refer to?
a) Data stored in volatile memory
b) The ability of data to outlive the application that created it
c) The method to delete an object
d) Encapsulation of data
Test Your Knowledge
3. In an OODB, objects are identified using:
a) Primary keys
b) Object identifiers (OIDs)
c) Foreign keys
d) Memory addresses
4. Which of the following is a commonly used query language for Object-
Oriented Databases?
a) SQL
b) OQL (Object Query Language)
c) XPath
d) SPARQL
Test Your Knowledge
5. Object-Relational Databases combine features of:
a) Flat files and object-oriented databases
b) Relational databases and flat files
c) Relational databases and object-oriented databases
d) XML databases and document stores
6. Which of the following SQL features is most relevant to Object-Relational
Databases?
a) Primary keys
b) User-defined types (UDTs)
c) Joins
d) Indexing
Test Your Knowledge
7. Which of the following is an example of an Object-Relational Database
Management System (ORDBMS)?
a) MongoDB
b) PostgreSQL
c) Oracle NoSQL
d) Couchbase
8. What is the role of a "nested table" in an ORDBMS?
a) To create a relationship between two tables
b) To store data hierarchically within a single column
c) To replace joins
d) To manage large binary objects
Answers
1. b) Encapsulation and inheritance
2. b) The ability of data to outlive the application that created it
3. b) Object identifiers (OIDs)
4. b) OQL (Object Query language)
5. c) Relational databases and object-oriented databases
6. b) User-defined types (UDTs)
7. b) PostgreSQL
8. b) To store data hierarchically within a single column
Supporting Materials
TEXT BOOKS:
1. “Database System Concepts”, 6th Edition by Abraham Silberschatz, Henry
F. Korth, S. Sudarshan, McGraw-Hill.
2. R. Elmasri and S.B. Navathe, 2000, Fundamentals of Database Systems,
3rd Ed, AW.
3. “Principles of Database and Knowledge – Base Systems”, Vol 1 by J.D.
Ullman, Computer Science Press.
SELF-LEARNING COMPONENTS:
[Link]
Please Note: 1)Students are supposed to learn the components on self-basis
2) At least 5-10 % syllabus will be asked in end term exams from self-learning
components.