SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Ch 4 components of the sqa system
Ch 4 components of the sqa systemCh 4 components of the sqa system
Ch 4 components of the sqa systemKittitouch Suteeca
 
Modelo en cascada
Modelo en cascadaModelo en cascada
Modelo en cascadaKamisutra
 
Basic Software Effort Estimation
Basic Software Effort EstimationBasic Software Effort Estimation
Basic Software Effort Estimationumair khan
 
Reconstructing Software Architecture
Reconstructing Software ArchitectureReconstructing Software Architecture
Reconstructing Software ArchitectureHimanshu
 
Software Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationSoftware Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationNishu Rastogi
 
System Analysis and Design
System Analysis and DesignSystem Analysis and Design
System Analysis and DesignAkshaya Parida
 
Computer architecture for vision system
Computer architecture for vision systemComputer architecture for vision system
Computer architecture for vision systemAkashPatil334
 
Métricas de Proceso y proyecto de software
Métricas de Proceso y proyecto de softwareMétricas de Proceso y proyecto de software
Métricas de Proceso y proyecto de softwareLorena Quiñónez
 
Software requirement and specification
Software requirement and specificationSoftware requirement and specification
Software requirement and specificationAman Adhikari
 
Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and viewsDr Reeja S R
 
Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)ShudipPal
 

Tendances (20)

software characteristics
software characteristicssoftware characteristics
software characteristics
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Ch 4 components of the sqa system
Ch 4 components of the sqa systemCh 4 components of the sqa system
Ch 4 components of the sqa system
 
Modelo en cascada
Modelo en cascadaModelo en cascada
Modelo en cascada
 
Basic Software Effort Estimation
Basic Software Effort EstimationBasic Software Effort Estimation
Basic Software Effort Estimation
 
Sdd template
Sdd templateSdd template
Sdd template
 
Reconstructing Software Architecture
Reconstructing Software ArchitectureReconstructing Software Architecture
Reconstructing Software Architecture
 
Software Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationSoftware Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and Specification
 
System Analysis and Design
System Analysis and DesignSystem Analysis and Design
System Analysis and Design
 
Computer architecture for vision system
Computer architecture for vision systemComputer architecture for vision system
Computer architecture for vision system
 
Métricas de Proceso y proyecto de software
Métricas de Proceso y proyecto de softwareMétricas de Proceso y proyecto de software
Métricas de Proceso y proyecto de software
 
Documenting Software Architectures
Documenting Software ArchitecturesDocumenting Software Architectures
Documenting Software Architectures
 
Software requirement and specification
Software requirement and specificationSoftware requirement and specification
Software requirement and specification
 
ATAM
ATAMATAM
ATAM
 
Cocomo
CocomoCocomo
Cocomo
 
Software process
Software processSoftware process
Software process
 
Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and views
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Dernier (20)

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

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