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

Weitere ähnliche Inhalte

Was ist angesagt?

Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design patternMindfire Solutions
 
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...VMware Tanzu
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - AdapterManoj Kumar
 
Layouts in android
Layouts in androidLayouts in android
Layouts in androidDurai S
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorialRohit Gupta
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaEdureka!
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented ArchitectureRobert Sim
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
Mobile Application vs Web Application
Mobile Application vs Web ApplicationMobile Application vs Web Application
Mobile Application vs Web ApplicationJatin Kochhar
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareVisual Engineering
 
RedisConf17 - Redis as Java Session Store
RedisConf17 - Redis as Java Session StoreRedisConf17 - Redis as Java Session Store
RedisConf17 - Redis as Java Session StoreRedis Labs
 
Service Oriented Architecture
Service Oriented Architecture Service Oriented Architecture
Service Oriented Architecture Prabhat gangwar
 

Was ist angesagt? (20)

Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - Adapter
 
Layouts in android
Layouts in androidLayouts in android
Layouts in android
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
 
Angular material
Angular materialAngular material
Angular material
 
Angular 9
Angular 9 Angular 9
Angular 9
 
Ooad
OoadOoad
Ooad
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | Edureka
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Proxy design pattern
Proxy design patternProxy design pattern
Proxy design pattern
 
Struts introduction
Struts introductionStruts introduction
Struts introduction
 
Mobile Application vs Web Application
Mobile Application vs Web ApplicationMobile Application vs Web Application
Mobile Application vs Web Application
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
 
RedisConf17 - Redis as Java Session Store
RedisConf17 - Redis as Java Session StoreRedisConf17 - Redis as Java Session Store
RedisConf17 - Redis as Java Session Store
 
Service Oriented Architecture
Service Oriented Architecture Service Oriented Architecture
Service Oriented Architecture
 
Js: master prototypes
Js: master prototypesJs: master prototypes
Js: master prototypes
 

Andere mochten auch

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
 
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
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modelingMario Fusco
 

Andere mochten auch (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
 
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
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
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
 
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
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
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
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 

Kürzlich hochgeladen (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
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...
 
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
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
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
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

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