Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started 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!
-
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
-
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:
- Are the physical table and attribute names meaningful - e.g., Peron, tbl_Person, LastName, Last_Name, FirstName, First_Name? If they are transforming them via a script or a Model Transformation should not be too complicated.
- Does you physical data model include relationships between tables - i.e., foreign keys? Is referential integrity enforced in the database layer? If it does, transforming the relationship with a script or a transform should also not be too complicated with one notable exception - please see below.
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.