• 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
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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: 150
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic