Author Topic: Modelling Persistence - Converting a Class Diagram to Tables  (Read 5813 times)

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
Modelling Persistence - Converting a Class Diagram to Tables
« on: March 23, 2016, 01:07:34 am »
Hi!

Is there anything built in to EA to generate and link a database table structure from a class diagram? I've looked at the code generation options, but I can't see anything relevant, so I'm assuming it's a manual job.

Given there's no automated way, is there any best practice of how to link the tables to the classes they are persisting in the model?

Again, I can't see an obvious relation, since "realizes" isn't appropriate.

Sorry if the answer is obvious and I've just missed it.

Thanks!

Screwtape.
Screwtape

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Modelling Persistence - Converting a Class Diagram to Tables
« Reply #1 on: March 23, 2016, 01:47:13 am »
Hi,

could you explain what you understand under a database table structure.

In general: A diagram is just a view of the model. Therefore usually generating from diagram makes no sense. Diagrams to simple select classes to generate code like DDL from ok.

From model elements there are a lot of generations available:
- Code generation DDL from Physical Database Model
- Transformations like DDL transformation available. See e.g. the example model and Database Engineering.
- and a lot more

You can generate:
- Physical Database Model from Logical Model
- DDL from Physical Database Model

You may customize generation or transformation. You may also define your own code generation (from model to code) or transformation (from model to model).

With technologies like Addin and Scripting you are complete free to define your functionality.

Regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
Re: Modelling Persistence - Converting a Class Diagram to Tables
« Reply #2 on: March 23, 2016, 02:12:57 am »
Thanks Helmut!

Transformation to DDL did exactly what I was looking for, although I'm slightly surprised that is didn't link the source class and generated tables in any way.

Thanks for pointing me in the right direction.

Screwtape.
Screwtape