Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

O-R mapping

 
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you hear the phrase O-R mapping do they mean Relationships as in Entity-Relationships ( 0,1 or many) or do they mean relationships as in the UML context i.e. dependencies,associations,generalisations,realizations ?
regards
 
Sheriff
Posts: 6968
2
Eclipse IDE Debian Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neither, really.
To me O-R mapping is mapping an "object" representation of something (ie, the in memory object graph) to a "relational" representation (ie. the tables and rows of a database).
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suppose you have to decide whether you are doing Object Modelling or Data Modelling .
If the first you are drawing relationships among objects hence the UML context of relationships is fine.
If the second you are mapping relationships to data tables and therefore have to consider Entity Relationships.
Dependencies and Associations more naturally follow Entity-Relationship modelling. 0,1 or many.
How do you follow mapping of generalisations (which show inheritance type of relationships - parent and child) and realisations (interfaces between classes or components and between use-cases and their collaborations) ?
My guess is you'd need a Data Model diagram, Use Case diagrams and Class Diagrams to capture all the relationships.
Am I correct ?
Or do I also need sequence diagrams and collaboration diagrams ?
regards
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

To me O-R mapping is mapping an "object" representation of something (ie, the in memory object graph) to a "relational" representation (ie. the tables and rows of a database).


Can you give me an example of what this might look like ?
regards
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at http://www.agiledata.org/, especially http://www.agiledata.org/essays/drivingForces.html
[ August 14, 2003: Message edited by: Ilja Preuss ]
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Illja. That helped a lot.

Take an iterative and incremental approach to development, including modeling. Agile developers iterate back and forth between tasks such as data modeling, object modeling, refactoring, mapping, implementing, and performance tuning. Your requirements should drive your object schema, your object schema should drive your data schema and source code, and performance challenges and platform (code & db) features should motivate evolutionary design changes to your object schema. There is still a logical order to doing things. On an project using object technology and relational databases together a good strategy is to do analysis/domain/conceptual modeling before design object modeling, which in turn leads to physical data design modeling, then mapping the two models, then refactoring in conjunction with performance tuning. However, it�s important to understand that this order can seem to disappear in the heat of development.


I hope this order is not peculiar to doing Agile Development.
Agile / XP projects are rather thin on the ground.But I can see how this could work with the other methodologies he lists.
regards
[ August 14, 2003: Message edited by: HS Thomas ]
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The single class mapped to several data tables , and vice versa was also useful. And the idea that different projects may need different models.

Adopt Agile Modeling�s principle of Multiple Models. No one model, certainly not a data model nor a UML class diagram, is sufficient for real world development. A modeler that only knows how to work with one type of model is just like a carpenter that only has a hammer in their tool kit � challenged at best, a significant danger to your project at worst. Although class models look at a much wider picture than data models, because they take behavior into account as well as data, they still aren�t sufficient by themselves.


regards
[ August 14, 2003: Message edited by: HS Thomas ]
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At what point do these models get thrown away.
What are their average life expectancy ? :roll:
Days, weeks , months ?
Data models were usually fairly static that a printed model was usually fairly good to use months on end.
Yet again, I expect this depends on the project.
regards
[ August 14, 2003: Message edited by: HS Thomas ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic