Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
3 views14 pages

Lec 2. Introduction To Object Oriented Data Models

Uploaded by

hdogar65
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)
3 views14 pages

Lec 2. Introduction To Object Oriented Data Models

Uploaded by

hdogar65
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/ 14

Introduction to object

oriented data models

Database Administration & Management


Sufa International College
Ahsan Ali [email protected]
1
Introduction
• Object-oriented databases are a type of database management
system.
• Different database management systems provide additional
functionalities.
• Object-oriented databases add the database functionality to object
programming languages, creating more manageable code bases
Object Database Definition

• An object database is managed by an object


oriented database management system (OODBMS).
• The database combines object-oriented programming concepts with
relational database principles.
• Objects are the basic building block and an instance of a class, where the
type is either built-in or user-defined.
• Classes provide a schema or blueprint for objects, defining the behavior.
• Methods determine the behavior of a class.
• Pointers help access elements of an object database and establish relations
between objects.
Object Database Definition
• 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.
class task
{
String name;
String status;
Date create_date;
public void update_task(String
status) { ... }
}
Object Database Definition
• 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 supplied to object-oriented programming where
complex objects are central.
• This approach unifies attributes and behaviors of data into one entity.
Object-Oriented Programming Concepts

• Object-oriented databases closely relate to object-oriented


programming concepts.
• The four main ideas of object-oriented programming are:
• Polymorphism (the ability of a message to be displayed in more than one form)
• Inheritance (a mechanism where you can to derive a class from another class for a hierarchy)
• Encapsulation(a process of wrapping code and data together into a single unit)
• Abstraction (The process of removing physical, spatial, or temporal details or attributes in the study)
• These four attributes describe the critical characteristics of object-
oriented management systems.
Polymorphism

• Polymorphism is the capability of an object to take multiple forms.


• This ability allows the same program code to work with different data
types.
• Both a car and a bike are able to break, but the mechanism is
different.
• In this example, the action break is a polymorphism.
• The defined action is polymorphic — the result changes depending
on which vehicle performs.
Inheritance

• Inheritance creates a hierarchical relationship between related classes


while making parts of code reusable.
• Defining new types inherits all the existing class fields and methods plus
further extends them.
• The existing class is the parent class, while the child class extends the
parent.
• For example, a parent class called Vehicle will have child
classes Car and Bike.
• Both child classes inherit information from the parent class
and extend the parent class with new information depending on the
vehicle type.
Encapsulation

• Encapsulation is the ability to group data and mechanisms into a


single object to provide access protection.
• Through this process, pieces of information and details of how an
object works are hidden, resulting in data and function security.
• Classes interact with each other through methods without the need
to know how particular methods work.
• As an example, a car has descriptive characteristics and actions. You
can change the color of a car, yet the model or make are examples of
properties that cannot change. A class encapsulates all the car
information into one entity, where some elements are modifiable
while some are not.
Abstraction

• Abstraction is the procedure of representing only the essential data


features for the needed functionality.
• The process selects vital information while unnecessary information stays
hidden.
• Abstraction helps reduce the complexity of modeled data and allows
reusability.
• For example, there are different ways for a computer to connect to the
network.
• A web browser needs an internet connection. However, the connection
type is irrelevant.
• An established connection to the internet represents an abstraction,
whereas the various types of connections represent different
implementations of the abstraction.
Object-Oriented Database Examples

Feature Description

Query Language Language to find objects and retrieve data from the database.

Transparent Ability to use an object-oriented programming language for data


Persistence manipulation.

ACID ACID (Atomicity, Consistency, Isolation, and Durability)transactions guarantee all


Transactions transactions are complete without conflicting changes.

Database Creates a partial replica of the database. Allows access to a database from
Caching program memory instead of a disk.

Recovery Disaster recovery in case of application or system failure.

You might also like