从概念数据模型生成UML [英] Generate UML from a conceptual data model

查看:129
本文介绍了从概念数据模型生成UML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用powerAMC为我的数据库创建的conceptual data model(关系模型),但是我想使用acceleo从它生成DAO,为此我需要UML,有没有一种方法可以从概念上生成UML数据模型模型?

解决方案

Acceleo可以从使用基于任何基于EMF的元模型定义的任何模型中生成代码. Eclipse Foundation的UML项目定义了一个基于EMF的UML元模型,以便用户可以基于EMF创建UML模型,从而Acceleo可以从这些模型中生成代码.

如果您要使用另一个元模型,则可以这样做,因此,如果您要创建一个与您的数据结构更紧密匹配的元模型,请随时这样做.例如,您可以看到

因此您可以:

  1. 创建与您的概念匹配的元模型
  2. 在Java中创建一个小型转换器,以创建EMF模型(元模型的实例定义数据库的概念),然后将数据库中的数据转换为仅需保存的EMF模型.
  3. 在模型中使用Acceleo:)

此致

Stephane Begaudeau

免责声明:我是Acceleo的负责人.

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 ?

解决方案

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.

这篇关于从概念数据模型生成UML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆