SlideShare a Scribd company logo
6
Most read
13
Most read
16
Most read
Mapping Problem Domain Objects
 to Object-Persistence Formats




                                 1
Introduction

o Each different formats can have some conversion requirements

o Regardless of the object persistence format chosen,

        -supporting primary keys and foreign keys to the problem domain classes

          additional processing required

        (i.e.,)developer have to set a value for foreign key when adding the relationships



                                Too costly

     o The design of the PD classes to be independent of any specific object persistence
        environment             increasing their portability and potential reuse




                                                                                             2
Continued…
Types of Object persistence formats

      Files

      Object oriented databases

      Object relational databases

      Relational databases

From a practical perspective ,

     ”File formats are used mostly for temporary storage “




                                                              3
Mapping problem domain objects to an
          OODBMS format
o Straight forward

o Each problem domain class should have a corresponding object persistence class

o DAM class manage the interaction between the object persistence class and
   problem domain class

o Once the object persistence format is adopted ,only the DAM will have to be
   modified

o This approach increases the portability and potential reuse of the problem domain
   classes




                                                                                      4
Appointment System Example




                             5
Mapping problem domain objects to an
       OODBMS format -Rules
Rule 1a:

o Add an attribute(s) to the OODBMS class(es) that represents the subclass(es) that
   contain an ObjectID of the instance stored in the OODBMS class that represent s
   the “additional “ superclass(es).

o The multiplicity of this subclass new association from the subclass to the
   “superclass” should be 1..1.

o An exclusive-or(XOR) constraint must be added between the associations. –each
   “additional superclass”                (OR)

Rule 1b:

o Flatten the inheritance hierarchy of the OODBMS classes by copying the attributes
   and methods of the additional OODBMS superclass(es) down to all of the
   OODBMS subclasses and remove the additional superclass from the design             6
Mapping problem domain objects to
      Single I-B OODBMS




                                    7
Continued…
Pros:
   Maximum flexibility of the maintenance of design
Cons:
   Reduces the overall efficiency of the design

Conclusion:

         “if the multiple inheritance used in the problem domain ,but not supported
   by the OODBMS, then the multiple inheritance should be factored out of the
   OODBMS classes”




                                                                                      8
Mapping problem domain objects to
      an ORDBMS format
Assumption,

o   supports

    -Objects IDs,

    -Multi valued attributes,

    -Stored procedures

o Does not support

    -inheritance




                                9
Mapping problem domain objects to
   an ORDBMS format -Rules
Rule 1:Map all concrete problem domain classes to the ORDBMS tables.

   Also if an abstract problem domain class has multiple direct subclasses, map the
   abstract class to an ORDBMS table.

Rule 2:Map single valued attributes to columns of the ORDBMS tables.

Rule 3:Map methods and derived attributes to stored procedures or to program
   modules.

Rule 4:Map single-valued aggregation and association relationships to a column that
   can store an Object ID. Do this for both sides of the relationship.

Rule 5:Map multi-valued attributes to a column that can contain a set of values .




                                                                                      10
Continued…
Rule 6:Map repeating groups of attributes to a new table and create a one-to-many
   association from the original table to the new one .

Rule7:Map multi-valued aggregation and association relationships to a column that can
   store an Object IDs. Do this for both sides of the reationship.

Rule 8:For aggregation and association relationships of mixed type(one-to-many or
   many-to-one),on the single –valued side(1..1or 0..1) of the relationship, add a
   column that can store a set of Object IDs.

           The values contained in this new column will be the Object IDs from the
   instances of the class on the multi-valued side.

           On the multi-valued side(1..*or0..*),add a column that can store a single
   Object ID that wll contain the value of the instance of the class on the single-valued
   side.
                                                                                       11
Continued…
For generalization/inheritance relationships:

Rule 9a: Add a column(s) to the table(s) that represents the subclass(es) that will
   contain an Object ID of the instance stored in the table that represents the
   superclass. The multiplicity of this new association from the subclass to the
   “superclass” should be 1..1.

   If the superclasses are concrete i.e.,they can be instantiated themselves,then the
   multiplicity from the superclass ta the baseclass is 0..*,otherwiseit is 1..1.An
   exclusive-or(XOR) constraint must be added between the associations. –each
   “superclass”                       (OR)

Rule 9b:Flatten the inheritance hierarchy by copying the superclass attributes down to
   all of the subclasses and remove the superclass from the design .

                                                                                        12
Mapping problem domain objects to
  an ORDBMS schema example




                                13
Continued…
Conclusion :




    “the development and production cost of using an OODBMS may be less than
       the development and production cost implementation cost of using an
       ORDBMS”




                                                                               14
Mapping problem domain objects to
       an RDBMS format

o Similar to the mapping to an ORDBMS



o Assumptions(ORDBMS) are no longer valid




                                            15
Mapping problem domain objects to
    an RDBMS format-Rules
Rule 1:Map all concrete problem domain classes to the RDBMS tables.
   also if an abstract problem domain class has multiple direct subclasses, map the
   abstract class to a RDBMS table.
Rule 2:Map single valued attributes to columns of the RDBMS tables.
Rule 3:Map methods and derived attributes to stored procedures or to program
   modules.
Rule 4:Map single-valued aggregation and association relationships to a column that
   can store the key of the related table . Do this for both sides of the relationship.
Rule 5:Map multi-valued attributes and repeating groups of attributes to a new table
   and create a one-to-many association from the original table to the new ones .




                                                                                          16
Continued…

Rule6:Map multi-valued aggregation and association relationships to a new associate
   table that relates the two original table together.

       copy the primary key from both original table to the new associate table

Rule 7:For aggregation and association relationships of mixed type, copy the primary
   key from the single-valued side (1..1 or 0..1) of the relationship to a new column in
   the table on the multi-valued side (1..* or 0..*) of the relationship that can store the
   key of the related table.




                                                                                          17
Continued…
Rule 8a: Ensure that the primary key of the subclass instance is the same as the
   primary key of the superclass.

          The multiplicity of this new association from the subclass to the “superclass”
   should be 1..1.

          If the superclasses are concrete i.e.,they can be instantiated themselves,then
   the multiplicity from the superclasses the subclass is 0..*,otherwiseit is 1..1.

          An exclusive-or(XOR) constraint must be added between the associations. –
   each “superclass”                        (OR)

Rule 8b: Flatten the inheritance by copying the superclass attributes down to all of the
   subclasses and remove the superclass from the design


                                                                                       18
Mapping Problem Domain objects to
    RDBMS schema example




                                    19
Continued…
Conclusion :




    “use RDBMS for storage of objects than the other approaches because are by
       far the most popular format”




                                                                                 20
21
Ad

Recommended

Natural language processing
Natural language processing
Saurav Aryal
 
Batch Processing vs Stream Processing Difference
Batch Processing vs Stream Processing Difference
jeetendra mandal
 
Introduction to Natural Language Processing
Introduction to Natural Language Processing
Mercy Rani
 
Distributed Database
Distributed Database
Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU
 
Active database
Active database
mridul mishra
 
Object Oriented Design
Object Oriented Design
Sudarsun Santhiappan
 
Chatbot development workshop with the Microsoft Bot Framework
Chatbot development workshop with the Microsoft Bot Framework
gjuljo
 
ELK stack introduction
ELK stack introduction
abenyeung1
 
Scalar expressions and control structures in perl
Scalar expressions and control structures in perl
sana mateen
 
Dbms recovering from a system crash
Dbms recovering from a system crash
Abhishek Kumar Gupta
 
Interface specification
Interface specification
maliksiddique1
 
Software configuration items
Software configuration items
ashok kumar
 
Data Flow Testing in Software Testing - JNTUA
Data Flow Testing in Software Testing - JNTUA
JVSTHARUNSAI
 
Applied NLP - Poster
Applied NLP - Poster
madhucharis
 
Python Interview Questions And Answers 2019 | Edureka
Python Interview Questions And Answers 2019 | Edureka
Edureka!
 
Automatic indexing
Automatic indexing
dhatchayaninandu
 
Dimensional model | | Fact Tables | | Types
Dimensional model | | Fact Tables | | Types
umair saeed
 
Data Flow Diagram
Data Flow Diagram
Puneet Arora
 
Lecture4 big data technology foundations
Lecture4 big data technology foundations
hktripathy
 
Word embeddings
Word embeddings
Ajay Taneja
 
The Journey to Data Mesh with Confluent
The Journey to Data Mesh with Confluent
confluent
 
Vector database
Vector database
Guy Korland
 
Chapter 10
Chapter 10
AbDul ThaYyal
 
Vector databases and neural search
Vector databases and neural search
Dmitry Kan
 
blackboard architecture
blackboard architecture
Nguyễn Ngân
 
Transaction Processing monitor
Transaction Processing monitor
District Administration
 
Artificial Intelligence by B. Ravikumar
Artificial Intelligence by B. Ravikumar
Garry D. Lasaga
 
Vector space model of information retrieval
Vector space model of information retrieval
Nanthini Dominique
 
Domain object model
Domain object model
university of education,Lahore
 
jTransfo lightning talk
jTransfo lightning talk
Joachim Van der Auwera
 

More Related Content

What's hot (20)

Scalar expressions and control structures in perl
Scalar expressions and control structures in perl
sana mateen
 
Dbms recovering from a system crash
Dbms recovering from a system crash
Abhishek Kumar Gupta
 
Interface specification
Interface specification
maliksiddique1
 
Software configuration items
Software configuration items
ashok kumar
 
Data Flow Testing in Software Testing - JNTUA
Data Flow Testing in Software Testing - JNTUA
JVSTHARUNSAI
 
Applied NLP - Poster
Applied NLP - Poster
madhucharis
 
Python Interview Questions And Answers 2019 | Edureka
Python Interview Questions And Answers 2019 | Edureka
Edureka!
 
Automatic indexing
Automatic indexing
dhatchayaninandu
 
Dimensional model | | Fact Tables | | Types
Dimensional model | | Fact Tables | | Types
umair saeed
 
Data Flow Diagram
Data Flow Diagram
Puneet Arora
 
Lecture4 big data technology foundations
Lecture4 big data technology foundations
hktripathy
 
Word embeddings
Word embeddings
Ajay Taneja
 
The Journey to Data Mesh with Confluent
The Journey to Data Mesh with Confluent
confluent
 
Vector database
Vector database
Guy Korland
 
Chapter 10
Chapter 10
AbDul ThaYyal
 
Vector databases and neural search
Vector databases and neural search
Dmitry Kan
 
blackboard architecture
blackboard architecture
Nguyễn Ngân
 
Transaction Processing monitor
Transaction Processing monitor
District Administration
 
Artificial Intelligence by B. Ravikumar
Artificial Intelligence by B. Ravikumar
Garry D. Lasaga
 
Vector space model of information retrieval
Vector space model of information retrieval
Nanthini Dominique
 
Scalar expressions and control structures in perl
Scalar expressions and control structures in perl
sana mateen
 
Dbms recovering from a system crash
Dbms recovering from a system crash
Abhishek Kumar Gupta
 
Interface specification
Interface specification
maliksiddique1
 
Software configuration items
Software configuration items
ashok kumar
 
Data Flow Testing in Software Testing - JNTUA
Data Flow Testing in Software Testing - JNTUA
JVSTHARUNSAI
 
Applied NLP - Poster
Applied NLP - Poster
madhucharis
 
Python Interview Questions And Answers 2019 | Edureka
Python Interview Questions And Answers 2019 | Edureka
Edureka!
 
Dimensional model | | Fact Tables | | Types
Dimensional model | | Fact Tables | | Types
umair saeed
 
Lecture4 big data technology foundations
Lecture4 big data technology foundations
hktripathy
 
The Journey to Data Mesh with Confluent
The Journey to Data Mesh with Confluent
confluent
 
Vector databases and neural search
Vector databases and neural search
Dmitry Kan
 
blackboard architecture
blackboard architecture
Nguyễn Ngân
 
Artificial Intelligence by B. Ravikumar
Artificial Intelligence by B. Ravikumar
Garry D. Lasaga
 
Vector space model of information retrieval
Vector space model of information retrieval
Nanthini Dominique
 

Viewers also liked (20)

Domain object model
Domain object model
university of education,Lahore
 
jTransfo lightning talk
jTransfo lightning talk
Joachim Van der Auwera
 
Modularity and Domain Driven Design; a killer combination?
Modularity and Domain Driven Design; a killer combination?
ACA IT-Solutions
 
Applying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain Models
PostSharp Technologies
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven Design
Bradley Holt
 
Domain driven design in a nutshell
Domain driven design in a nutshell
Toni Esteves
 
Success by Challenging Assumptions (Part I)
Success by Challenging Assumptions (Part I)
LaDonna Coy
 
Domain Driven Design Quickly
Domain Driven Design Quickly
Mariam Hakobyan
 
Introduction to Domain Driven Design
Introduction to Domain Driven Design
Christos Tsakostas
 
Introduction to-ddd
Introduction to-ddd
John Ferguson Smart Limited
 
Domain State model OOAD
Domain State model OOAD
Raghu Kumar
 
Domain Driven Design
Domain Driven Design
Ryan Riley
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with Rails
Declan Whelan
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven Design
David Berliner
 
Why Domain-Driven Design Matters
Why Domain-Driven Design Matters
Mathias Verraes
 
Domain Driven Design Introduction
Domain Driven Design Introduction
Tung Nguyen Thanh
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
Steven Smith
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)
Tom Kocjan
 
Implementing DDD with C#
Implementing DDD with C#
Pascal Laurin
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
thinkddd
 
Modularity and Domain Driven Design; a killer combination?
Modularity and Domain Driven Design; a killer combination?
ACA IT-Solutions
 
Applying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain Models
PostSharp Technologies
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven Design
Bradley Holt
 
Domain driven design in a nutshell
Domain driven design in a nutshell
Toni Esteves
 
Success by Challenging Assumptions (Part I)
Success by Challenging Assumptions (Part I)
LaDonna Coy
 
Domain Driven Design Quickly
Domain Driven Design Quickly
Mariam Hakobyan
 
Introduction to Domain Driven Design
Introduction to Domain Driven Design
Christos Tsakostas
 
Domain State model OOAD
Domain State model OOAD
Raghu Kumar
 
Domain Driven Design
Domain Driven Design
Ryan Riley
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with Rails
Declan Whelan
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven Design
David Berliner
 
Why Domain-Driven Design Matters
Why Domain-Driven Design Matters
Mathias Verraes
 
Domain Driven Design Introduction
Domain Driven Design Introduction
Tung Nguyen Thanh
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
Steven Smith
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)
Tom Kocjan
 
Implementing DDD with C#
Implementing DDD with C#
Pascal Laurin
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
thinkddd
 
Ad

Similar to Mapping Problem Domain Objects to Object-Persistence Formats(OOAD) (20)

Comparision
Comparision
saurabhbagane
 
Chapt 1 odbms
Chapt 1 odbms
Sushil Kulkarni
 
Mapping objects to_relational_databases
Mapping objects to_relational_databases
Ivan Paredes
 
MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptx
elsagalgao
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Vikas Jagtap
 
7 data management design
7 data management design
Châu Thanh Chương
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
Sonali Parab
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Reengineering of relational databases to object oriented database
Reengineering of relational databases to object oriented database
eSAT Journals
 
Reengineering of relational databases to objectoriented
Reengineering of relational databases to objectoriented
eSAT Publishing House
 
CH11.ppt
CH11.ppt
ssuser5c874e
 
Data modeling
Data modeling
Abdoulaye M Yansane
 
Object oriented data model
Object oriented data model
Vyanktesh Dorlikar
 
Adbms 14 oodbms concepts for managing objects
Adbms 14 oodbms concepts for managing objects
Vaibhav Khanna
 
Practical Object Oriented Models In Sql
Practical Object Oriented Models In Sql
Karwin Software Solutions LLC
 
ZendCon 2011 Learning CouchDB
ZendCon 2011 Learning CouchDB
Bradley Holt
 
Introduction to odbms
Introduction to odbms
ajay pashankar
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Chapter 1 Concepts for Object-oriented Databases.pptx
Chapter 1 Concepts for Object-oriented Databases.pptx
haymanottaddess2015m
 
Ch10
Ch10
蕭美蓮
 
Mapping objects to_relational_databases
Mapping objects to_relational_databases
Ivan Paredes
 
MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptx
elsagalgao
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Vikas Jagtap
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
Sonali Parab
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Reengineering of relational databases to object oriented database
Reengineering of relational databases to object oriented database
eSAT Journals
 
Reengineering of relational databases to objectoriented
Reengineering of relational databases to objectoriented
eSAT Publishing House
 
Adbms 14 oodbms concepts for managing objects
Adbms 14 oodbms concepts for managing objects
Vaibhav Khanna
 
ZendCon 2011 Learning CouchDB
ZendCon 2011 Learning CouchDB
Bradley Holt
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Chapter 1 Concepts for Object-oriented Databases.pptx
Chapter 1 Concepts for Object-oriented Databases.pptx
haymanottaddess2015m
 
Ad

More from Meenakshi Devi (7)

Good habits
Good habits
Meenakshi Devi
 
Ns2programs
Ns2programs
Meenakshi Devi
 
Study of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proram
Meenakshi Devi
 
Mobile computing seminar
Mobile computing seminar
Meenakshi Devi
 
Ant colony optimization
Ant colony optimization
Meenakshi Devi
 
Asychronous transfer mode(atm)
Asychronous transfer mode(atm)
Meenakshi Devi
 
Greedymethod
Greedymethod
Meenakshi Devi
 
Study of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proram
Meenakshi Devi
 
Mobile computing seminar
Mobile computing seminar
Meenakshi Devi
 
Ant colony optimization
Ant colony optimization
Meenakshi Devi
 
Asychronous transfer mode(atm)
Asychronous transfer mode(atm)
Meenakshi Devi
 

Recently uploaded (20)

Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
June 2025 Progress Update With Board Call_In process.pptx
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
Code Profiling in Odoo 18 - Odoo 18 Slides
Code Profiling in Odoo 18 - Odoo 18 Slides
Celine George
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
Code Profiling in Odoo 18 - Odoo 18 Slides
Code Profiling in Odoo 18 - Odoo 18 Slides
Celine George
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 

Mapping Problem Domain Objects to Object-Persistence Formats(OOAD)

  • 1. Mapping Problem Domain Objects to Object-Persistence Formats 1
  • 2. Introduction o Each different formats can have some conversion requirements o Regardless of the object persistence format chosen, -supporting primary keys and foreign keys to the problem domain classes additional processing required (i.e.,)developer have to set a value for foreign key when adding the relationships Too costly o The design of the PD classes to be independent of any specific object persistence environment increasing their portability and potential reuse 2
  • 3. Continued… Types of Object persistence formats  Files  Object oriented databases  Object relational databases  Relational databases From a practical perspective , ”File formats are used mostly for temporary storage “ 3
  • 4. Mapping problem domain objects to an OODBMS format o Straight forward o Each problem domain class should have a corresponding object persistence class o DAM class manage the interaction between the object persistence class and problem domain class o Once the object persistence format is adopted ,only the DAM will have to be modified o This approach increases the portability and potential reuse of the problem domain classes 4
  • 6. Mapping problem domain objects to an OODBMS format -Rules Rule 1a: o Add an attribute(s) to the OODBMS class(es) that represents the subclass(es) that contain an ObjectID of the instance stored in the OODBMS class that represent s the “additional “ superclass(es). o The multiplicity of this subclass new association from the subclass to the “superclass” should be 1..1. o An exclusive-or(XOR) constraint must be added between the associations. –each “additional superclass” (OR) Rule 1b: o Flatten the inheritance hierarchy of the OODBMS classes by copying the attributes and methods of the additional OODBMS superclass(es) down to all of the OODBMS subclasses and remove the additional superclass from the design 6
  • 7. Mapping problem domain objects to Single I-B OODBMS 7
  • 8. Continued… Pros: Maximum flexibility of the maintenance of design Cons: Reduces the overall efficiency of the design Conclusion: “if the multiple inheritance used in the problem domain ,but not supported by the OODBMS, then the multiple inheritance should be factored out of the OODBMS classes” 8
  • 9. Mapping problem domain objects to an ORDBMS format Assumption, o supports -Objects IDs, -Multi valued attributes, -Stored procedures o Does not support -inheritance 9
  • 10. Mapping problem domain objects to an ORDBMS format -Rules Rule 1:Map all concrete problem domain classes to the ORDBMS tables. Also if an abstract problem domain class has multiple direct subclasses, map the abstract class to an ORDBMS table. Rule 2:Map single valued attributes to columns of the ORDBMS tables. Rule 3:Map methods and derived attributes to stored procedures or to program modules. Rule 4:Map single-valued aggregation and association relationships to a column that can store an Object ID. Do this for both sides of the relationship. Rule 5:Map multi-valued attributes to a column that can contain a set of values . 10
  • 11. Continued… Rule 6:Map repeating groups of attributes to a new table and create a one-to-many association from the original table to the new one . Rule7:Map multi-valued aggregation and association relationships to a column that can store an Object IDs. Do this for both sides of the reationship. Rule 8:For aggregation and association relationships of mixed type(one-to-many or many-to-one),on the single –valued side(1..1or 0..1) of the relationship, add a column that can store a set of Object IDs. The values contained in this new column will be the Object IDs from the instances of the class on the multi-valued side. On the multi-valued side(1..*or0..*),add a column that can store a single Object ID that wll contain the value of the instance of the class on the single-valued side. 11
  • 12. Continued… For generalization/inheritance relationships: Rule 9a: Add a column(s) to the table(s) that represents the subclass(es) that will contain an Object ID of the instance stored in the table that represents the superclass. The multiplicity of this new association from the subclass to the “superclass” should be 1..1. If the superclasses are concrete i.e.,they can be instantiated themselves,then the multiplicity from the superclass ta the baseclass is 0..*,otherwiseit is 1..1.An exclusive-or(XOR) constraint must be added between the associations. –each “superclass” (OR) Rule 9b:Flatten the inheritance hierarchy by copying the superclass attributes down to all of the subclasses and remove the superclass from the design . 12
  • 13. Mapping problem domain objects to an ORDBMS schema example 13
  • 14. Continued… Conclusion : “the development and production cost of using an OODBMS may be less than the development and production cost implementation cost of using an ORDBMS” 14
  • 15. Mapping problem domain objects to an RDBMS format o Similar to the mapping to an ORDBMS o Assumptions(ORDBMS) are no longer valid 15
  • 16. Mapping problem domain objects to an RDBMS format-Rules Rule 1:Map all concrete problem domain classes to the RDBMS tables. also if an abstract problem domain class has multiple direct subclasses, map the abstract class to a RDBMS table. Rule 2:Map single valued attributes to columns of the RDBMS tables. Rule 3:Map methods and derived attributes to stored procedures or to program modules. Rule 4:Map single-valued aggregation and association relationships to a column that can store the key of the related table . Do this for both sides of the relationship. Rule 5:Map multi-valued attributes and repeating groups of attributes to a new table and create a one-to-many association from the original table to the new ones . 16
  • 17. Continued… Rule6:Map multi-valued aggregation and association relationships to a new associate table that relates the two original table together. copy the primary key from both original table to the new associate table Rule 7:For aggregation and association relationships of mixed type, copy the primary key from the single-valued side (1..1 or 0..1) of the relationship to a new column in the table on the multi-valued side (1..* or 0..*) of the relationship that can store the key of the related table. 17
  • 18. Continued… Rule 8a: Ensure that the primary key of the subclass instance is the same as the primary key of the superclass. The multiplicity of this new association from the subclass to the “superclass” should be 1..1. If the superclasses are concrete i.e.,they can be instantiated themselves,then the multiplicity from the superclasses the subclass is 0..*,otherwiseit is 1..1. An exclusive-or(XOR) constraint must be added between the associations. – each “superclass” (OR) Rule 8b: Flatten the inheritance by copying the superclass attributes down to all of the subclasses and remove the superclass from the design 18
  • 19. Mapping Problem Domain objects to RDBMS schema example 19
  • 20. Continued… Conclusion : “use RDBMS for storage of objects than the other approaches because are by far the most popular format” 20
  • 21. 21