This article explores several scenarios to help you choose the best type for an entity identifier. The best type for Entity ID will depend on your data governance use case, architecture pattern, and entity type.
This article is only about the choice of the Entity ID type. You can refer to Create a data model and Create entities and attributes articles for the global model and entity creation process. |
Identify how will data be generated and used
Firstly, for each model Entity, you need to know how data will be generated or created: will data be created in another source system and synchronized to xDM or will be manually authoring in xDM application?
Secondary, for each model Entity, you need to know how data will be exposed out of xDM (with batch ou web services), and if Entity ID will be propagated or not.
Choose Entity ID type for common use cases
The choice matrix of Entity ID type is the same for Basic Entity, ID Matched Entity, and Fuzzy Matched Entity (except Golden Id Generation). To choose the ID type and generation option, you can refer to this most common use cases :
How the data is provided? | How the Entity ID is consumed? | ID Generation and Type |
---|---|---|
With an ID from a source system | shared with the target system | Generation: Manual / Type: Compatible with target and source systems. String will work by default. |
not shared | Generation: Manual / Type: Same type as source system ID | |
Without an ID from a source system | shared with the target system | Generation: Sequence / Type: Integer |
not shared | Generation: Sequence or UUID / Type: Integer or UUID | |
Manually provided by the user in Data Application | shared with the target system | Generation: Manual / Type: String if ID will be significant (ex: code or abbreviation) or Integer |
not shared | Generation: Manual / Type: String if ID will be significant (ex: code or abbreviation) or Integer |
For Fuzzy Matched Entity:
- Manual ID will be ever generated as a String type to ensure ID format compatibility in any case.
- You have to choose in addition to the Golden ID Generation option. Golden ID is ever automatically generated by Semarchy xDM because it depends on the matching process. You can choose only the ID Generation format (Sequence or UUID). This choice only depends on how is Golden ID consumed and used by target systems.
For very specific use cases, you can also choose to automatically Generate ID with SemQL expression. It's useful when you need to generate specific ID which is composed of different kinds of information (ex: Product ID with Family and Subfamily abbreviation and a sequence). |