SlideShare a Scribd company logo
1 of 21
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

More Related Content

What's hot

Transaction Numbering in Oracle Receivables
Transaction Numbering in Oracle ReceivablesTransaction Numbering in Oracle Receivables
Transaction Numbering in Oracle Receivablesnuppara
 
Fixed partitioning of memory
Fixed partitioning of memoryFixed partitioning of memory
Fixed partitioning of memoryJohn Scott Giini
 
Windows 7 Architecture
Windows 7 ArchitectureWindows 7 Architecture
Windows 7 ArchitectureDaniyal Khan
 
Semaphores and Monitors
 Semaphores and Monitors Semaphores and Monitors
Semaphores and Monitorssathish sak
 
Multithreading models.ppt
Multithreading models.pptMultithreading models.ppt
Multithreading models.pptLuis Goldster
 
Election algorithms
Election algorithmsElection algorithms
Election algorithmsAnkush Kumar
 
Storage management in operating system
Storage management in operating systemStorage management in operating system
Storage management in operating systemDeepikaT13
 
Project Management challenges in oracle EBS/ERP implementations
Project Management challenges in oracle EBS/ERP implementationsProject Management challenges in oracle EBS/ERP implementations
Project Management challenges in oracle EBS/ERP implementationsSIVAKUMAR_G
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory ManagementAkmal Cikmat
 
How to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR RestHow to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR Restshravan kumar chelika
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingVaibhav Khanna
 
Software requirements specification
Software  requirements specificationSoftware  requirements specification
Software requirements specificationKrishnasai Gudavalli
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1myrajendra
 
4. concurrency control
4. concurrency control4. concurrency control
4. concurrency controlAbDul ThaYyal
 

What's hot (20)

Transaction Numbering in Oracle Receivables
Transaction Numbering in Oracle ReceivablesTransaction Numbering in Oracle Receivables
Transaction Numbering in Oracle Receivables
 
Google File System
Google File SystemGoogle File System
Google File System
 
Fixed partitioning of memory
Fixed partitioning of memoryFixed partitioning of memory
Fixed partitioning of memory
 
Windows 7 Architecture
Windows 7 ArchitectureWindows 7 Architecture
Windows 7 Architecture
 
Os Question Bank
Os Question BankOs Question Bank
Os Question Bank
 
Semaphores and Monitors
 Semaphores and Monitors Semaphores and Monitors
Semaphores and Monitors
 
Multithreading models.ppt
Multithreading models.pptMultithreading models.ppt
Multithreading models.ppt
 
Election algorithms
Election algorithmsElection algorithms
Election algorithms
 
Chapter18
Chapter18Chapter18
Chapter18
 
Storage management in operating system
Storage management in operating systemStorage management in operating system
Storage management in operating system
 
Project Management challenges in oracle EBS/ERP implementations
Project Management challenges in oracle EBS/ERP implementationsProject Management challenges in oracle EBS/ERP implementations
Project Management challenges in oracle EBS/ERP implementations
 
Awt controls ppt
Awt controls pptAwt controls ppt
Awt controls ppt
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
 
How to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR RestHow to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR Rest
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
 
Global payroll
Global payroll Global payroll
Global payroll
 
Software requirements specification
Software  requirements specificationSoftware  requirements specification
Software requirements specification
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
 
4. concurrency control
4. concurrency control4. concurrency control
4. concurrency control
 
Java beans
Java beansJava beans
Java beans
 

Viewers also liked

Modularity and Domain Driven Design; a killer combination?
Modularity and Domain Driven Design; a killer combination?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 ModelsApplying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain ModelsPostSharp Technologies
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignBradley Holt
 
Domain driven design in a nutshell
Domain driven design in a nutshellDomain driven design in a nutshell
Domain driven design in a nutshellToni Esteves
 
Success by Challenging Assumptions (Part I)
Success by Challenging Assumptions (Part I)Success by Challenging Assumptions (Part I)
Success by Challenging Assumptions (Part I)LaDonna Coy
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design QuicklyMariam Hakobyan
 
Introduction to Domain Driven Design
Introduction to Domain Driven DesignIntroduction to Domain Driven Design
Introduction to Domain Driven DesignChristos Tsakostas
 
Domain State model OOAD
Domain State model  OOADDomain State model  OOAD
Domain State model OOADRaghu Kumar
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignRyan Riley
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with RailsDomain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with RailsDeclan Whelan
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven DesignDavid Berliner
 
Why Domain-Driven Design Matters
Why Domain-Driven Design MattersWhy Domain-Driven Design Matters
Why Domain-Driven Design MattersMathias Verraes
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design IntroductionTung Nguyen Thanh
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCSteven Smith
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)Tom Kocjan
 
Implementing DDD with C#
Implementing DDD with C#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 SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slidesthinkddd
 

Viewers also liked (20)

Domain object model
Domain object modelDomain object model
Domain object model
 
jTransfo lightning talk
jTransfo lightning talkjTransfo lightning talk
jTransfo lightning talk
 
Modularity and Domain Driven Design; a killer combination?
Modularity and Domain Driven Design; a killer combination?Modularity and Domain Driven Design; a killer combination?
Modularity and Domain Driven Design; a killer combination?
 
Applying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain ModelsApplying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain Models
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven Design
 
Domain driven design in a nutshell
Domain driven design in a nutshellDomain driven design in a nutshell
Domain driven design in a nutshell
 
Success by Challenging Assumptions (Part I)
Success by Challenging Assumptions (Part I)Success by Challenging Assumptions (Part I)
Success by Challenging Assumptions (Part I)
 
Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
 
Introduction to Domain Driven Design
Introduction to Domain Driven DesignIntroduction to Domain Driven Design
Introduction to Domain Driven Design
 
Introduction to-ddd
Introduction to-dddIntroduction to-ddd
Introduction to-ddd
 
Domain State model OOAD
Domain State model  OOADDomain State model  OOAD
Domain State model OOAD
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with RailsDomain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with Rails
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven Design
 
Why Domain-Driven Design Matters
Why Domain-Driven Design MattersWhy Domain-Driven Design Matters
Why Domain-Driven Design Matters
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
 

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

MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxMIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxelsagalgao
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseSonali Parab
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapVikas Jagtap
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)stanbridge
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodbMohammed Ragab
 
Overview on NoSQL and MongoDB
Overview on NoSQL and MongoDBOverview on NoSQL and MongoDB
Overview on NoSQL and MongoDBharithakannan
 
Java-8-Structured-MongoDB.pptx
Java-8-Structured-MongoDB.pptxJava-8-Structured-MongoDB.pptx
Java-8-Structured-MongoDB.pptxSuKimAnhCTU
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopediaAlex Ali
 
ORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 SpecificationsORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 SpecificationsAhmed Ramzy
 

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

Nosql databases
Nosql databasesNosql databases
Nosql databases
 
MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxMIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptx
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
 
ORDBMS.pptx
ORDBMS.pptxORDBMS.pptx
ORDBMS.pptx
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
 
Mongo db
Mongo dbMongo db
Mongo db
 
RG OOP-talk
RG OOP-talkRG OOP-talk
RG OOP-talk
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
Overview on NoSQL and MongoDB
Overview on NoSQL and MongoDBOverview on NoSQL and MongoDB
Overview on NoSQL and MongoDB
 
05 inheritance
05 inheritance05 inheritance
05 inheritance
 
Edgar f
Edgar fEdgar f
Edgar f
 
Doodads quickref
Doodads quickrefDoodads quickref
Doodads quickref
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Java-8-Structured-MongoDB.pptx
Java-8-Structured-MongoDB.pptxJava-8-Structured-MongoDB.pptx
Java-8-Structured-MongoDB.pptx
 
Scalax
ScalaxScalax
Scalax
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopedia
 
Nosql databases
Nosql databasesNosql databases
Nosql databases
 
ORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 SpecificationsORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 Specifications
 
Rails meets no sql
Rails meets no sqlRails meets no sql
Rails meets no sql
 

More from Meenakshi Devi

Study of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proramStudy of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proramMeenakshi Devi
 
Mobile computing seminar
Mobile computing seminarMobile computing seminar
Mobile computing seminarMeenakshi Devi
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimizationMeenakshi Devi
 
Asychronous transfer mode(atm)
Asychronous transfer mode(atm)Asychronous transfer mode(atm)
Asychronous transfer mode(atm)Meenakshi Devi
 

More from Meenakshi Devi (7)

Good habits
Good habitsGood habits
Good habits
 
Ns2programs
Ns2programsNs2programs
Ns2programs
 
Study of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proramStudy of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proram
 
Mobile computing seminar
Mobile computing seminarMobile computing seminar
Mobile computing seminar
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Asychronous transfer mode(atm)
Asychronous transfer mode(atm)Asychronous transfer mode(atm)
Asychronous transfer mode(atm)
 
Greedymethod
GreedymethodGreedymethod
Greedymethod
 

Recently uploaded

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Recently uploaded (20)

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 

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