Mapping multipart external Identifiers into internal identifier

5 pts.
Tags:
Data conversion
Mapping
String manipulation
What is the good way of mapping multipart external Identifiers(which is different for different external parties) to an internal Identifier. for example suppose we have two parties whose identifiers to represent their single product is different. party1 - ID set (p11, p12, p13) party2 - Id set (p21,p22) and we need to map these external identifier with out internal id based on the party. We can have tables like - products( internalId(PK), ....) party_id_components(id part(PK), partyid(PK)) party_id_mapping( idpart(FK), partyid(FK), internalId(FK), idpartvalue)  eg: products( i1) products(i2) party_id_components(p11,party1) party_id_components(p12,party1) party_id_components(p13,party1) party_id_components(p21,party2) party_id_components(p22,party2) party_id_mapping(p11,partyid1,i1,idpartvalue11) party_id_mapping(p12,partyid1,i1,idpartvalue12) party_id_mapping(p13,partyid1,i1,idpartvalue13) party_id_mapping(p21,partyid2,i2,idpartvalue21) party_id_mapping(p22,partyid2,i2,idpartvalue21) but this is not a good solution, as making querying to find an internal id given an external id set and v.v will be difficult and performance may hit if for a party the external id consists of many parts. other solution is combining the parts of the parties with a delimiter and store that . eg: products(i1) products(i2) party_id_components(p11$p12$p13,party1) party_id_components(p21$p22,party2) party_id_mapping(p11$p12$p13,party1,i1,idpartvalue11$idpartvalue12$idpartvalue13) party_id_mapping(p21$p22,party2,i2,idpartvalue21$idpartvalue22) Does anyone knows a better solution - something like use a good hash function etc... ?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    I'm not sure I understand your proposed design. Does the multi-part external identifier identify a party or a product ? If the latter, why are you relating the parts to the party in your party_id_components table ? Can a party have more than one product ? Are you going to need to manipulate or query the parts of a multi-part identifier separately ? Why don't you provide a more elaborated example with actual values (i.e. numbers and/or strings) instead of p11, p12, etc ?
    69,240 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following