SlideShare une entreprise Scribd logo
1  sur  16
OBJECT-ORIENTED DATA
MODEL :
Concept of Inheritance &
Persistent programming languages
Name : Vyanktesh Haribhau Dorlikar
Roll No : 1324
OODM
 Loosely speaking, an object corresponds to an
entity in the E-R model.
 An object represents a real world entity
(Person), a concept (Cricket Match), a logical
thing (Driving Licence), a physical thing (Car)
 An object associated with :
◦ A set of variables that contain the data for the object. The value of
each variable is itself an object.
◦ A set of messages to which the object responds; each message may
have zero, one, or more parameters.
◦ A set of methods, each of which is a body of code to implement a
message; a method returns a value as the response to the message
Class Definition
 class employee {
/*Variables */
string name;
string address;
date start-date;
int salary;
/* Messages */
int annual-salary();
string get-name();
string get-address();
int set-address(string new-address);
int employment-length();
};
Inheritance
 Inheritance is the ability of an object
within the class hierarchy to inherit the
attributes and methods of the class above
it.
 E.g., Some part of the class of bank
customers is similar to class of bank
employees, although there are differences
◦ both share some variables and messages, e.g., name
and address.
◦ But there are variables and messages specific to each
class e.g., salary for employees and credit-rating for
customers.
 Every employee is a person; thus
employee is a specialization of person
 Similarly, customer is a specialization of
person.
PERSON : Name, Address, Birth date, Age
EMPLOYEE: Name, Address, Birth date, Age,
Salary, Hire Date, Seniority
CUSTOMER: Name, Address, Birth date, Age,
Major, GPA
OR:
EMPLOYEE subtype-of PERSON: Salary, Hire
Date, Seniority
CUSTOMER subtype-of PERSON: Major, GPA
Multiple Inheritance
 With multiple inheritance a class may have more than one super
class.
◦ The class/subclass relationship is represented by a directed acyclic
graph (DAG)
◦ Particularly useful when objects can be classified in more than one
way, which are independent of each other
 E.g. temporary/permanent is independent of
Officer/secretary/teller
◦ Eg . A person can play the roles of student, a teacher or
footballPlayer, or any combination of the three
 E.g., student who is teaching assistant who also play football
 Multiple Inheritance Create a subclass for each combination of
subclasses
 Need not create subclasses for combinations that are not possible
in the database being modeled
 A class inherits variables and methods from all its
superclasses
 There is potential for ambiguity when a
variable/message N with the same name is inherited
from two superclasses A and B
◦ No problem if the variable/message is defined in a shared
superclass
◦ Otherwise, do one of the following
 flag as an error,
 rename variables (A.N and B.N)
 choose one.
Example of Multiple Inheritance
(DAG)
Object-Oriented Languages
 Object-oriented concepts can be used in
different ways
◦ Object-orientation can be used as a design tool, and be encoded into,
for example, a relational database
(analogous to modeling data with E-R diagram and then converting to
a set of relations)
◦ The concepts of object orientation can be incorporated into a
programming language that is used to manipulate the database.
 Persistent programming languages – extend object-oriented
programming language to deal with databases by adding concepts
such as persistence and collections.
Persistent Programming Languages
 Persistent Programming languages allow
objects to be created and stored in a
database, and used directly from a
programming language
◦ allow data to be manipulated directly from the programming language
 No need to go through SQL.
◦ No need for explicit format (type) changes
 format changes are carried out transparently by system
 Without a persistent programming language, format changes becomes a
burden on the programmer
 More code to be written
 More chance of bugs
◦ allow objects to be manipulated in-memory
 no need to explicitly load from or store to the database
 Saved code, and saved overhead of loading/storing large amounts of
data
 Drawbacks of persistent programming
languages
◦ Due to power of most programming languages, it is easy to make
programming errors that damage the database.
◦ Complexity of languages makes automatic high-level optimization more
difficult.
Persistent C++ Systems
 C++ language allows support for persistence to be added
without changing the language
◦ Declare a class called Persistent Object with attributes and methods to
support persistence
◦ Overloading – ability to redefine standard function names and operators
(i.e., +, –, the pointer deference operator –>) when applied to new types
◦ Template classes help to build a type-safe system supporting collections
and persistent types.
 Providing persistence without extending the C++ language is
◦ relatively easy to implement
◦ but more difficult to use
Persistent Java Systems
 (object database management group)ODMG-3.0
defines extensions to Java for persistence
◦ Java does not support templates, so language extensions are required
 Class is made persistence capable by running a
post-processor on object code generated by the
Java compiler
◦ Contrast with pre-processor used in C++
◦ Post-processor adds mark_modified() automatically
 Defines collection types Dset(union, intersection, diff),
Dlist(creates list of objects), etc.
 Uses Java iterators, no need for new iterator class
 Transaction must start accessing database
from one of the root object (looked up
by name)
◦ finds other objects by following pointers from the root objects
 a fetched object are allocated space in
memory, but all objects not necessarily
fetched
◦ An object with space allocated but not yet fetched is called a hollow
object
◦ When a hollow object is accessed, its data is fetched from disk.
THANK YOU

Contenu connexe

Tendances

OODM-object oriented data model
OODM-object oriented data modelOODM-object oriented data model
OODM-object oriented data modelAnilPokhrel7
 
Object database standards, languages and design
Object database standards, languages and designObject database standards, languages and design
Object database standards, languages and designDabbal Singh Mahara
 
9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMSkoolkampus
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management SystemAjay Jha
 
physical and logical data independence
physical and logical data independencephysical and logical data independence
physical and logical data independenceapoorva_upadhyay
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and DevelopmentEr. Nawaraj Bhandari
 
The three level of data modeling
The three level of data modelingThe three level of data modeling
The three level of data modelingsharmila_yusof
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar Nesargi
 
Comparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented DatabaseComparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented DatabaseEditor IJMTER
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER DiagramsAdri Jovin
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 

Tendances (20)

OODM-object oriented data model
OODM-object oriented data modelOODM-object oriented data model
OODM-object oriented data model
 
PPL, OQL & oodbms
PPL, OQL & oodbmsPPL, OQL & oodbms
PPL, OQL & oodbms
 
Object database standards, languages and design
Object database standards, languages and designObject database standards, languages and design
Object database standards, languages and design
 
Introduction to odbms
Introduction to odbmsIntroduction to odbms
Introduction to odbms
 
9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS
 
Odbms concepts
Odbms conceptsOdbms concepts
Odbms concepts
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management System
 
Ch8
Ch8Ch8
Ch8
 
physical and logical data independence
physical and logical data independencephysical and logical data independence
physical and logical data independence
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and Development
 
Chapter 3 Entity Relationship Model
Chapter 3 Entity Relationship ModelChapter 3 Entity Relationship Model
Chapter 3 Entity Relationship Model
 
The three level of data modeling
The three level of data modelingThe three level of data modeling
The three level of data modeling
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Comparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented DatabaseComparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented Database
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Object oriented database
Object oriented databaseObject oriented database
Object oriented database
 
DBMS CS 4-5
DBMS CS 4-5DBMS CS 4-5
DBMS CS 4-5
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 

En vedette

Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPTTrinath
 
Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Sahan Walpitagamage
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and modelssabah N
 
Mark higginscrowd sourced_data_science_competitions
Mark higginscrowd sourced_data_science_competitionsMark higginscrowd sourced_data_science_competitions
Mark higginscrowd sourced_data_science_competitionsodsc
 
The Object Oriented Database System Manifesto
The Object Oriented Database System ManifestoThe Object Oriented Database System Manifesto
The Object Oriented Database System ManifestoBeat Signer
 
Encryptioon and key management introduction
Encryptioon and key management introductionEncryptioon and key management introduction
Encryptioon and key management introductionVyanktesh Dorlikar
 
A Federated In-Memory Database System for Life Sciences
A Federated In-Memory Database System for Life SciencesA Federated In-Memory Database System for Life Sciences
A Federated In-Memory Database System for Life SciencesMatthieu Schapranow
 
Modern Big Data Systems for Machine Learning
Modern Big Data Systems for Machine LearningModern Big Data Systems for Machine Learning
Modern Big Data Systems for Machine Learningzpektral
 
Module 3 Object Oriented Data Models Object Oriented notations
Module 3  Object Oriented Data Models Object Oriented notationsModule 3  Object Oriented Data Models Object Oriented notations
Module 3 Object Oriented Data Models Object Oriented notationsTaher Barodawala
 
Slide 2 data models
Slide 2 data modelsSlide 2 data models
Slide 2 data modelsVisakh V
 
Types of Data Validation
Types of Data ValidationTypes of Data Validation
Types of Data ValidationMetric Fox
 
Database Management system
Database Management systemDatabase Management system
Database Management systemVijay Thorat
 

En vedette (20)

Object oriented dbms
Object oriented dbmsObject oriented dbms
Object oriented dbms
 
Data models
Data modelsData models
Data models
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Dbms models
Dbms modelsDbms models
Dbms models
 
Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)Object-Relational Database Systems(ORDBMSs)
Object-Relational Database Systems(ORDBMSs)
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Mark higginscrowd sourced_data_science_competitions
Mark higginscrowd sourced_data_science_competitionsMark higginscrowd sourced_data_science_competitions
Mark higginscrowd sourced_data_science_competitions
 
The Object Oriented Database System Manifesto
The Object Oriented Database System ManifestoThe Object Oriented Database System Manifesto
The Object Oriented Database System Manifesto
 
Ibm cell
Ibm cell Ibm cell
Ibm cell
 
Encryptioon and key management introduction
Encryptioon and key management introductionEncryptioon and key management introduction
Encryptioon and key management introduction
 
wireless biometric system
wireless biometric systemwireless biometric system
wireless biometric system
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 
A Federated In-Memory Database System for Life Sciences
A Federated In-Memory Database System for Life SciencesA Federated In-Memory Database System for Life Sciences
A Federated In-Memory Database System for Life Sciences
 
Modern Big Data Systems for Machine Learning
Modern Big Data Systems for Machine LearningModern Big Data Systems for Machine Learning
Modern Big Data Systems for Machine Learning
 
Data validation option
Data validation optionData validation option
Data validation option
 
Module 3 Object Oriented Data Models Object Oriented notations
Module 3  Object Oriented Data Models Object Oriented notationsModule 3  Object Oriented Data Models Object Oriented notations
Module 3 Object Oriented Data Models Object Oriented notations
 
Slide 2 data models
Slide 2 data modelsSlide 2 data models
Slide 2 data models
 
Athena
AthenaAthena
Athena
 
Types of Data Validation
Types of Data ValidationTypes of Data Validation
Types of Data Validation
 
Database Management system
Database Management systemDatabase Management system
Database Management system
 

Similaire à Object oriented data model

Ube Databases
Ube DatabasesUbe Databases
Ube DatabasesDang Tuan
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1RubaNagarajan
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsITNet
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf3BRBoruMedia
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfHouseMusica
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01Zafor Iqbal
 
Object Oriented Programming Language is an oop
Object Oriented Programming Language is an oopObject Oriented Programming Language is an oop
Object Oriented Programming Language is an oopsanaiftikhar23
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptkaavyashruthi
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptRamadossSundaramoort1
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introductionsandeep54552
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperLee Greffin
 
JAVA-PPT'S.pptx
JAVA-PPT'S.pptxJAVA-PPT'S.pptx
JAVA-PPT'S.pptxRaazIndia
 

Similaire à Object oriented data model (20)

Ube Databases
Ube DatabasesUbe Databases
Ube Databases
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objects
 
oodb.ppt
oodb.pptoodb.ppt
oodb.ppt
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Lecture 01 - Basic Concept About OOP With Python
Lecture 01 - Basic Concept About OOP With PythonLecture 01 - Basic Concept About OOP With Python
Lecture 01 - Basic Concept About OOP With Python
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
 
Oodb
OodbOodb
Oodb
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 
Object Oriented Programming Language is an oop
Object Oriented Programming Language is an oopObject Oriented Programming Language is an oop
Object Oriented Programming Language is an oop
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.ppt
 
introduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.pptintroduction-to-object-oriented-programming.ppt
introduction-to-object-oriented-programming.ppt
 
OOP_1_TEG
OOP_1_TEGOOP_1_TEG
OOP_1_TEG
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
 
Cs2305 programming paradigms lecturer notes
Cs2305   programming paradigms lecturer notesCs2305   programming paradigms lecturer notes
Cs2305 programming paradigms lecturer notes
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft Developer
 
JAVA-PPT'S.pptx
JAVA-PPT'S.pptxJAVA-PPT'S.pptx
JAVA-PPT'S.pptx
 

Dernier

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Dernier (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Object oriented data model

  • 1. OBJECT-ORIENTED DATA MODEL : Concept of Inheritance & Persistent programming languages Name : Vyanktesh Haribhau Dorlikar Roll No : 1324
  • 2. OODM  Loosely speaking, an object corresponds to an entity in the E-R model.  An object represents a real world entity (Person), a concept (Cricket Match), a logical thing (Driving Licence), a physical thing (Car)  An object associated with : ◦ A set of variables that contain the data for the object. The value of each variable is itself an object. ◦ A set of messages to which the object responds; each message may have zero, one, or more parameters. ◦ A set of methods, each of which is a body of code to implement a message; a method returns a value as the response to the message
  • 3. Class Definition  class employee { /*Variables */ string name; string address; date start-date; int salary; /* Messages */ int annual-salary(); string get-name(); string get-address(); int set-address(string new-address); int employment-length(); };
  • 4. Inheritance  Inheritance is the ability of an object within the class hierarchy to inherit the attributes and methods of the class above it.
  • 5.  E.g., Some part of the class of bank customers is similar to class of bank employees, although there are differences ◦ both share some variables and messages, e.g., name and address. ◦ But there are variables and messages specific to each class e.g., salary for employees and credit-rating for customers.  Every employee is a person; thus employee is a specialization of person  Similarly, customer is a specialization of person.
  • 6. PERSON : Name, Address, Birth date, Age EMPLOYEE: Name, Address, Birth date, Age, Salary, Hire Date, Seniority CUSTOMER: Name, Address, Birth date, Age, Major, GPA OR: EMPLOYEE subtype-of PERSON: Salary, Hire Date, Seniority CUSTOMER subtype-of PERSON: Major, GPA
  • 7. Multiple Inheritance  With multiple inheritance a class may have more than one super class. ◦ The class/subclass relationship is represented by a directed acyclic graph (DAG) ◦ Particularly useful when objects can be classified in more than one way, which are independent of each other  E.g. temporary/permanent is independent of Officer/secretary/teller ◦ Eg . A person can play the roles of student, a teacher or footballPlayer, or any combination of the three  E.g., student who is teaching assistant who also play football  Multiple Inheritance Create a subclass for each combination of subclasses  Need not create subclasses for combinations that are not possible in the database being modeled
  • 8.  A class inherits variables and methods from all its superclasses  There is potential for ambiguity when a variable/message N with the same name is inherited from two superclasses A and B ◦ No problem if the variable/message is defined in a shared superclass ◦ Otherwise, do one of the following  flag as an error,  rename variables (A.N and B.N)  choose one.
  • 9. Example of Multiple Inheritance (DAG)
  • 10. Object-Oriented Languages  Object-oriented concepts can be used in different ways ◦ Object-orientation can be used as a design tool, and be encoded into, for example, a relational database (analogous to modeling data with E-R diagram and then converting to a set of relations) ◦ The concepts of object orientation can be incorporated into a programming language that is used to manipulate the database.  Persistent programming languages – extend object-oriented programming language to deal with databases by adding concepts such as persistence and collections.
  • 11. Persistent Programming Languages  Persistent Programming languages allow objects to be created and stored in a database, and used directly from a programming language ◦ allow data to be manipulated directly from the programming language  No need to go through SQL. ◦ No need for explicit format (type) changes  format changes are carried out transparently by system  Without a persistent programming language, format changes becomes a burden on the programmer  More code to be written  More chance of bugs ◦ allow objects to be manipulated in-memory  no need to explicitly load from or store to the database  Saved code, and saved overhead of loading/storing large amounts of data
  • 12.  Drawbacks of persistent programming languages ◦ Due to power of most programming languages, it is easy to make programming errors that damage the database. ◦ Complexity of languages makes automatic high-level optimization more difficult.
  • 13. Persistent C++ Systems  C++ language allows support for persistence to be added without changing the language ◦ Declare a class called Persistent Object with attributes and methods to support persistence ◦ Overloading – ability to redefine standard function names and operators (i.e., +, –, the pointer deference operator –>) when applied to new types ◦ Template classes help to build a type-safe system supporting collections and persistent types.  Providing persistence without extending the C++ language is ◦ relatively easy to implement ◦ but more difficult to use
  • 14. Persistent Java Systems  (object database management group)ODMG-3.0 defines extensions to Java for persistence ◦ Java does not support templates, so language extensions are required  Class is made persistence capable by running a post-processor on object code generated by the Java compiler ◦ Contrast with pre-processor used in C++ ◦ Post-processor adds mark_modified() automatically  Defines collection types Dset(union, intersection, diff), Dlist(creates list of objects), etc.  Uses Java iterators, no need for new iterator class
  • 15.  Transaction must start accessing database from one of the root object (looked up by name) ◦ finds other objects by following pointers from the root objects  a fetched object are allocated space in memory, but all objects not necessarily fetched ◦ An object with space allocated but not yet fetched is called a hollow object ◦ When a hollow object is accessed, its data is fetched from disk.