Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Tarzan on February 18, 2025, 12:12:33 am

Title: Automatically generating a logical data model from a physical data model in Spar
Post by: Tarzan on February 18, 2025, 12:12:33 am
Hello everyone,

I am working with Sparx Enterprise Architect version 16.1 and I’m wondering if it’s possible to automatically generate a logical data model based on an existing physical data model. I have already created the physical data model, but I would like to know if there is a way to automate the conversion to a logical data model within the software, or if I need to do this manually.

Has anyone had experience with this functionality, or can anyone provide tips or tricks to make this process easier?

Thanks in advance!
Title: Re: Automatically generating a logical data model from a physical data model in Spar
Post by: Geert Bellekens on February 18, 2025, 12:20:18 am
I would probably write a script.
I guess you can copy the physical datamodel, remove the table+column stereotypes, and update the types of the attributes.
Then replace the FK's by associations, and you have a start of a logical model.

Shouldn't be too hard to write a one time conversion.

What is harder (or even impossible?) is to write something to synchronize an existing logical data model with an updated physical data model.

Geert
Title: Re: Automatically generating a logical data model from a physical data model in Spar
Post by: Modesto Vega on February 18, 2025, 11:23:12 pm
You could use a script or a Model Transformation, the script is easier but a Model Transformation is more concise. I have used both and, for bulk generation, have a slight preference for the latter but I know other forum contributors do not agree.

The quality of your logical data model is going to depend on a number of factors:

Unfortunately, Sparx EA does not have an elegant and easy to use out-of-the box way of handling multi-barrel foreign keys/relationships.

It is possible to synchronise the logical and physical models, as well as the database structures, with Sparx EA but you need to do all your data modelling in it.