Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: xkrystof on December 12, 2007, 07:25:23 am

Title: ID and GUID difference
Post by: xkrystof on December 12, 2007, 07:25:23 am
Please,

could someone clarify me the difference between
ID and GUID?
When should not be ID used?

We have stored out project in database with plenty of models: use-case, data model, etc. Is it OK to use for searchong elments and packages ID???

Thanks
Title: Re: ID and GUI difference
Post by: thomaskilian on December 12, 2007, 07:28:07 am
A GUID is valid across several models. An ID just within a single one.
Title: Re: ID and GUID difference
Post by: xkrystof on December 12, 2007, 07:47:37 am
is it valid in a single project?
Title: Re: ID and GUID difference
Post by: «Midnight» on December 12, 2007, 07:56:12 am
Both are valid in a single project. You can use the one that works best for your purposes.

Remember that EA will assign the ID property via a counter. There may be several counters, for diagrams, elements, connectors, and so forth. In any given model an ID is unique (within its category). A GUID is unique across all categories, and across all models.
Title: Re: ID and GUID difference
Post by: xkrystof on December 12, 2007, 08:28:56 am
Thanks for your repplies!
It helped ...
Title: Re: ID and GUID difference
Post by: Eric Johannsen on December 23, 2007, 12:56:39 am
It's important to realize that if you export your model to XMI then re-import it (without the "strip GUIDs") option:

- You WILL get new ID's
- You WILL KEEP the old Guid's

If you do any sort of integration with external systems you'll want to use the GUID.

Eric
Title: Re: ID and GUID difference
Post by: Thomas Mercer-Hursh on December 23, 2007, 10:24:24 am
One might also note that an ID is unique only within a table, while GUID is unique across all tables.