Book a Demo

Author Topic: How to consolidate 2 models?  (Read 3339 times)

XtofKe

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
How to consolidate 2 models?
« on: May 19, 2008, 08:44:29 pm »
We have two enterprise data models (created as UML class diagrams) which we need to consolidate.
Let's call them model A (400 classes) and model B (100 classes) which are both EAP files.

Some classes (eg. Party, Person,…) appear in both the the models with exactly the same name but related to different other classes in the model to which they belong.

The question now is: how to consolidate both models into 1 single model in an automated fashion ?

Thanks in advance for your advice/feedback.

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: How to consolidate 2 models?
« Reply #1 on: May 19, 2008, 11:15:54 pm »
That is a rather complicated task- as elements in the model are referenced as UIDs rather by name every relation and every link to a diagram is different even if it is the same actor, class or whatever.
The exception: One of the models is the basis of the other. Then the redundant elements have the same ID in both models.
In this case chances are high that exporting one model to XMI and reimporting it into the other will lead to the expected results.

If the elements have been freshly created and are not a fork of an existing repository then there is either the manual way or trying to write an addin which filters for the names of end-to-end relations and links in diagrams replacing the redundant part.
On the other hand it might be that eg. actors in both models have different note texts, attributes or links which then would have to be synchronised.

This is an interesting challenge and I would love to be kept updated here for any progress.

Good luck.

Oliver

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: How to consolidate 2 models?
« Reply #2 on: May 20, 2008, 07:43:06 am »
I suppose you have 3 possibilities when merging 2 elements from both models:
1. Two elements are truly distinct - separate names and semantics. Both should be kept in the new combined model
2. Two elements are named the same, but represent 2 different entities - both should be kept
3. Two elements have the same name and semantics.  Which one do you keep? (latest modified time, most tagged values populated, longest description or merge descriptions etc...)

For only 100 elements - I'd be inclined to do this manually.  XMI export the 100 element project, import into a new package in the 400 element project, then run some SQL to identify elements that have the same names.  If less than 20, I would probably list all diagrams and manually update.  If a large overlap, (say >100 entities to merge) then I would definitely automate at the database level.

I've often found some SQL is great at doing this.  You are up for about 8 tables in the EA database if you want to merge.

I am going to do this in the future with some of our projects who have modeled separately from the main DB.  I will post some scripts I develop... but won't be for a few months.

David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"