SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 
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
 
JAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptxJAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptxKunalYadav65140
 

Ähnlich wie 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
 
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
 
JAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptxJAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptx
 

Kürzlich hochgeladen

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

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.