从概念数据模型生成 UML

发布于 12-22 12:34 字数 104 浏览 6 评论 0原文

我有一个使用 powerAMC 为我的数据库创建的概念数据模型(关系模型),但我想使用 acceleo 从中生成 DAO,为此我需要在 UML 中使用它,是有没有办法从概念数据模型生成 UML?

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 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苏辞2024-12-29 12:34:43

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

如果您想使用另一个元模型,您可以这样做,因此如果您想创建一个与您的数据结构更匹配的元模型,请随意这样做。作为示例,您可以查看 这里是我创建的 Scala 语言元模型,我的生成器使用从此元模型定义的模型来生成代码。您可以找到使用此元模型 这里。您可以在这个示例中看到 Acceleo 生成器是在我的 scala 元模型“http://github.com/sbegaudeau/acceleo/scalametamodel/2011/01”上定义的(与在 UML 上定义的 Acceleo 生成器相反,它是使用标准 UML 元模型“http://www.eclipse.org/uml2/3.0.0/UML”),我可以在 Acceleo 中直接操作该元模型中的一些概念,例如特征(如果您熟悉 Scala)。

因此,您可以:

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

问候,

Stephane Begaudeau

免责声明:我是 Acceleo 的领导者。

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.

黑寡妇2024-12-29 12:34:43

PowerAMC 的数据模型不像 UML 那样是对象。因此不可能将其转换为UML。

如果您直接拥有生成的数据库,那么您可以从代码创建 UML 模型,但不能从数据库建模器创建。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文