0% found this document useful (0 votes)
36 views12 pages

Object Oriented

The document discusses the Object-Oriented Data Model (OODBM) in Database Management Systems (DBMS), highlighting its structure where data and relationships are encapsulated as objects. It outlines two approaches for designing OODBM, emphasizing the model's ability to represent complex real-world problems and its advantages such as code reusability and easier maintenance. However, it also notes disadvantages like limited adoption compared to relational databases and performance issues due to complexity.

Uploaded by

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

Object Oriented

The document discusses the Object-Oriented Data Model (OODBM) in Database Management Systems (DBMS), highlighting its structure where data and relationships are encapsulated as objects. It outlines two approaches for designing OODBM, emphasizing the model's ability to represent complex real-world problems and its advantages such as code reusability and easier maintenance. However, it also notes disadvantages like limited adoption compared to relational databases and performance issues due to complexity.

Uploaded by

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

Object-oriented

Database
Done by Tapiwa Tembo
W221942
Data Models in DBMS
A Data Model in Database Management System (DBMS) is the concept of tools that are developed to
summarize the description of the database. Data Models provide us with a transparent picture of data
which helps us in creating an actual database. It shows us from the design of the data to its proper
implementation of

Object-Oriented Data Model


In the Object-Oriented Data Model, data and their relationships are contained in a single structure which is referred to
as an object in this data model. In this, real-world problems are represented as objects with different attributes. All
objects have multiple relationships between them. Basically, it is a combination of Object Oriented programming and a
Relational Database Model.

Object Oriented Data Model = Combination of


Object Oriented Programming + Relational
database model
Following are the two different approaches for designing an object-oriented database:

• Designed to store, retrieve and manage objects created by programs written in some object
oriented languages (OOL) such as C++ or java.

Although a relational database can be used to store and manage objects, it does not
understand objects as such. Therefore, a middle layer called object manager or object-
oriented layer software is required to translate objects into tuples of a relation .

• Designed to provide object-oriented facilities to users of non object-oriented programming


languages (OOPLs) such as C or Pascal.

 The user will create classes, objects, inheritance and so on and the database system will
store and manage these objects and classes. This second approach, thus, turns non-OOPLs
into OOPLs. A translation layer is required to map the objects created by user into objects
of the database system.
 The main characteristic of objects in OODBMS is the possibility of user-constructed
types. An object created in a project or application saves into a database as is.
 Object-oriented databases directly deal with data as complete objects. All the information
comes in one instantly available object package instead of multiple tables.
 In contrast, the basic building blocks of relational databases, such as PostgreSQL or MySQL
, are tables with actions based on logical connections between the table data.
 These characteristics make object databases suitable for projects with complex data which
require an object-oriented approach to programming. An object-oriented management
system provides supported functionality catered to object-oriented programming where
complex objects are central. This approach unifies attributes and behaviors of data into
one entity.

Object-Oriented Database Examples


 There are different kinds of implementations of object databases. Most contain the
following features:
Feature Description
Query Language to find objects and retrieve data from.
The database
Transparent Persistence Ability to use an object-oriented programming language for
data manipulation.
ACID Transactions ACID transactions guarantee all transactions are complete
without conflicting changes.
Database Caching Creates a partial replica of the database. Allows access to a
database from program memory instead of a disk.
 Recovery Disaster recovery in case of application or system
failure.
Need of Object Oriented Data Model :
To represent the complex real world problems there was a need for a data model that is closely related
to real world. Object Oriented Data Model represents the real world problems easily.

Components of Object Oriented Data Model :


 Objects –
An object is an abstraction of a real world entity or we can say it is an instance of class.
Objects encapsulates data and code into a single unit which provide data abstraction by
hiding the implementation details from the user. For example: Instances of student, doctor,
engineer in above figure.

 Attribute –
An attribute describes the properties of object. For example: Object is STUDENT and its
attribute are Roll no, Branch, Setmarks() in the Student class.

 Methods –
 Method represents the behavior of an object. Basically, it represents the real-world action.
For example: Finding a STUDENT marks in above figure as Setmarks().

 Class –
A class is a collection of similar objects with shared structure i.e. attributes and behavior
i.e. methods. An object is an instance of class. For example: Person, Student, Doctor,
Engineer in above figure. Class student
 {
 char Name[20];
 int roll_no;
 --
 --
 public:
 void search();
 void update();
 }
 In this example, students refers to class and S1, S2 are the objects of class which
can be created in main function.
 Inheritance –
By using inheritance, new class can inherit the attributes and methods of the old
class i.e. base class. For example: as classes Student, Doctor and Engineer are
inherited from the base class Person.

 Advantages of Object Oriented Data Model :


 Codes can be reused due to inheritance.
 Easily understandable.
 Cost of maintenance can reduced due to reusability of attributes and functions
because of inheritance.
 Disadvantages of Object Oriented Data Model :
 It is not properly developed so not accepted by users easily.
Not as widely adopted as relational databases.
No universal data model. Lacks theoretical foundations and standards.
Does not support views.
High complexity causes performance issues.
 An adequate security mechanism and access rights to objects do not exist.

You might also like