Win a copy of High Performance Python for Data Analytics this week in the Python 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

convert Data Model to Object Model

 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any tool in the market to convert data model to object model(Class diagram)? (Rational / something else). Practically is it possible ?
 
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What your searching for is an object relational mapping(O/RM) tool or framework.

Take a look at:

http://en.wikipedia.org/wiki/Object-relational_mapping

www.hibernate.org/

or goto google and search for object relational mapping or

/Svend Rost
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, an ORM tool will map data to objects at runtime, based on the existing models.

Some of them also include tools to create object models out of data models or the other way around, but the result typically is less than optimal. That's because the forces that drive the data model (efficient queries on the data) are very different from those that drive the object model (behaviour).

I think Scott Ambler has some good articles on the topic online - google for "agile data" for a starting point.
 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My bad. I assumed he was looking for something to use at runtime. I should
have read his post more thoroughly.

In case you choose to perform the mapping (more or less) by hand, you might
find Fowlers Enterprise Architecture Patterns interesting: http://www.martinfowler.com/eaaCatalog/

/Svend Rost
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kri shan:
Any tool in the market to convert data model to object model(Class diagram)? (Rational / something else). Practically is it possible ?



Hi Kri,

Java Database Objects (JDO) will do this for you. There are many free and commercial JDO products. JPox is a good free JDO product.

Regards,

Fintan
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ilja Preuss:
...but the result typically is less than optimal. That's because the forces that drive the data model (efficient queries on the data) are very different from those that drive the object model (behaviour).

I think Scott Ambler has some good articles on the topic online - google for "agile data" for a starting point.



FYI: kri shan was referred to the articles back in April Data Model ------> Object Model.

Those articles offer an explanation to why tools of that nature would be rare and of limited usefulness (as you have indicated).
 
author
Posts: 608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might find Why Object Models Shouldn't Drive Data Models (and vice versa) to be of interest. Although it is quite straightforward to generate an object model from a data model, or a data model from an object model, you likely will not get what you actually want from the generation. The tools that do this do an OK job of it, but as I show at Mapping Objects to RDBs you have to make important decisions when you do OR mapping. The end result is that because you have choice, it isn't possible to produce a perfect automation tool.

You can automate the grunt work though.

- Scott
 
I've been selected to go to the moon! All thanks to this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic