2

I want to design a database.I heard UML is one of the way. What is the advantage in using UML? When should I decide I have to use UML ? and also after generating the code from model how should I proceed?I'm using UML studio for designing the database.

2 Answers 2

1

There are many advantages but it mainly depends on how you use it and to what purpose. The first is that by means of a graphical modeling language it might be easier to look at the whole database architecture and possibly find improvements. The second important reason is that being platform independent you can, in principle, generate different artifacts supporting your database implementation (i.e. SQL scripts, Data Access Objects, documentation, etc.)

Now I don't know UML Studio but in Eclipse you can use Papyrus to model your DB architecture (a stereotyped class diagrams should be enough) and Acceleo to define and execute your own model to text transformation workflows.

This may help you http://lowcoupling.com/modeling http://lowcoupling.com/post/47802411601/uml-diagrams-and-models-with-papyrus http://lowcoupling.com/post/47347056110/models-to-text-transformations-with-mofm2t-and-acceleo

Sign up to request clarification or add additional context in comments.

3 Comments

okay...one more doubt i have is there are different types of diagrams like activity diagram,class diagram,component diagram etc.. For modeling or designing a database all type of diagrams are used or only some of its types?
when you say designing a database I guess you mean its architecture (i.e. Entity Relationship Diagram). If so a class diagram is enough
yeah...thank you. Now i have designed a model and have generated the code.What is my next step?.What am i suppose to do with the code?
1

I'm a big fan of UML, but UML diagrams are not the best solution to model databases, and especially Entity-Relationship. In fact all the best UML modeling tools support ER diagrams, too (besides many other types of diagrams). Yes, class diagrams can be used in a similar way, but ER diagrams offer a better visualization and support specific presentation options; you can define the type of each attribute among those supported by the specific DBMS you are using. I love Visual Paradigm, as UML and ER tool, but it's only my taste. Normally you have other nice options in advanced IDE supporting DB modeling, like real DB reverse engineering, SQL generation, support for physical and logical models (using different data types), and so on. I would use a class diagram to model a DB only if I can't use another tool supporting ER diagrams.

Hope this helps!

Luca

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.