Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to turn an Aggregation and Composition into a java classes and SQL tables?
How to turn an Aggregation and Composition into a java classes and SQL tables? [message #635108] Mon, 25 October 2010 12:11 Go to next message
Ben Stover
Messages: 104
Registered: January 2010
Senior Member
Assume I have an UML diagram with a lot of logical data classes with Aggregation and Composition (and other) relationships.

How can I turn them into (a) java classes and (b) SQL tables?

I am primarily not interested in tools which do the job automatically for me but general guidline tutorials on how to do such a task theoretically.

As far as I know there a various way to do this. So I need some best practive recommendations.

When should a class put into an own java class/sql table and when to embed into the parent class,....

I can imagine that there are good webpages on this topic.

Ben

[Updated on: Mon, 25 October 2010 12:11]

Report message to a moderator

Re: How to turn an Aggregation and Composition into a java classes and SQL tables? [message #635174 is a reply to message #635108] Mon, 25 October 2010 16:39 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael Chaves
Messages: 161
Registered: July 2009
Senior Member
Ben, it seems you are looking for guidance on how to map an object model to a relational database.

I would search the web for ORM (object-relational mapping) strategies. "Hibernate in Action" has a good discussion of the possible approaches. This search returns some good hits as well:

http://bit.ly/bRSD5j

or full URL.

HTH,

Rafael
http://abstratt.com/blog

[Updated on: Mon, 25 October 2010 16:40]

Report message to a moderator

Re: How to turn an Aggregation and Composition into a java classes and SQL tables? [message #635297 is a reply to message #635108] Tue, 26 October 2010 06:30 Go to previous message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
You have today two main options out of the box :
Many tools provides a database generated from a class diagram. I would say that this is not the right approach because the database is very basic and usually a class is created as an entity. You also don't have graphical information or code that you can manipulate.
You can use to create a database without code manipulation which is sometimes not so bad with the following tools: MagicDraw, EnterpriseArchitect, Altova or RSA.

I would recommend the use of a database profile in which Hibernate annotations are mapped to UML stereotypes.
We have added a live synchronization, reverse etc...between UML and java annotations. As explained by Rafael, the next step is only to use Hibernate to generate your database. You can use Omondo EclipseUML.

Another option which requires code manipulation is to use Dali and reverse or create a database, get the annotation in the code and finally reverse the java code into a compatible Eclipse UML tool. You don't have database stereotypes but you still see classes in a class diagram. You can use Papyrus, Topcased, UML2tool or RSA

Hope this help.
Could luck for your project.

[Updated on: Tue, 26 October 2010 06:31]

Report message to a moderator

Previous Topic:Cannot seem to install UML Tools or UML Tools SDK
Next Topic:defaultValue of an EnumerationLiteral is discarded
Goto Forum:
  


Current Time: Sat Aug 30 08:24:22 EDT 2014

Powered by FUDForum. Page generated in 0.09157 seconds