Book a Demo

Author Topic: DB schema in EA that can be used in several RDBMS  (Read 2139 times)

Pesto

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
DB schema in EA that can be used in several RDBMS
« on: March 01, 2022, 07:13:33 pm »
Hello all,

I have a question about DB modeling. In the forum a similar aspect has been covered a couple of times, unfortunately I didn't manage to apply the result to our UseCase. Maybe I just didn't understand it correctly. I really hope someone of you can help me.

We want to maintain a DB schema in the EA that can be used in several RDBMS. Since these differ of course in detail, we want to create a generic model that applies to all DBs. However, an RDBMS-specific table element is then to be derived from each table, in which the RDBMS-specific properties are then maintained. If no changes have been made in the specific table element, then of course the definitions and properties of the parent element should be adopted.
At the end of the process, we would then like to have an RDBMS-specific DDL script created of course.

So far I have tried a lot with "Child Elements". That didn't look too bad. Unfortunately the column definitions of the parent are not taken over, so that a generation of the DDL script failed with the error that no column definitions exist.
Then I tried it with "Clone Structure as new version". But there a completely new element is inserted, which has no further connection to the original object. At least I didn't get it to work that way.

Can someone here help me how to do this? Of course, our main goal is to define a table only once, if possible, and to maintain the RDBMS-specific deviations separately.

I am looking forward to your answers! Thanks a lot!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: DB schema in EA that can be used in several RDBMS
« Reply #1 on: March 01, 2022, 08:04:52 pm »
What you are looking for is a type of logical -> physical model transformation.

There are a few options to so something like that:

- use the built-in transformations and customise the transformation templates. Transformation templates however are very complex and hard to understand. They will typically get you easily 80% of the way, but the remaining 20% will be very hard.

- use a custom built transformation script. Requires knowledge of scripting and the EA API, but will certainly get you to the 100%

- use/build a custom add-in. A long time ago I have built an add-in to do exactly this for a client. This add-in is part of the open source EA Toolpack that can be found here: https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/releases/tag/v2.3.18.0. The description for the add-in is found here: https://bellekens.com/ea-database-transformer/

Geert