Generate UML from a conceptual data model

随声附和 提交于 2020-01-06 08:41:46

问题


I have an conceptual data model (Relational model) created using powerAMC for my database but i wanted to generate DAO from it using acceleo and for that i need it in UML , is there a way to generate UML from a conceptual data model model ?


回答1:


Acceleo can generate code from any models defined with any EMF based metamodel. The UML project of the Eclipse Foundation defines an UML metamodel based on EMF so that users can create UML models based on EMF and Acceleo can thus generate code from those models.

If you want to use another metamodel, you can do it, so if you want to create a metamodel that matches more closely your data structure, feel free to do so. As an example, you can see here a metamodel that I have created of the Scala language and my generator uses models defined from this metamodel to generate the code. You can find an example of a generator using this metamodel here. You can see in this example that the Acceleo generator is defined on my scala metamodel "http://github.com/sbegaudeau/acceleo/scalametamodel/2011/01" (contrary to an Acceleo generator that would be defined on UML that would be using the standard UML metamodel "http://www.eclipse.org/uml2/3.0.0/UML") and I can manipulate in Acceleo some concepts from this metamodel directly like traits (if you are familiar with Scala).

So you can:

  1. create a metamodel that matches your concepts
  2. create a small converter in java to create an EMF model (instance of your metamodel defining the concepts of your database) and then transform the data in your database to an EMF model that you just have to save.
  3. use Acceleo with your models :)

Regards,

Stephane Begaudeau

Disclaimer: I am the leader of Acceleo.




回答2:


PowerAMC has a data model which is not object like UML. It is therefore impossible to transform it to UML.

If you have directly the generated database then you can create the UML model from the code but not from database modeler.



来源:https://stackoverflow.com/questions/8578645/generate-uml-from-a-conceptual-data-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!