I have a nice SQL Server DB setup with 2 tables with one to many relationship. Something like this:
TYPE:
ID Type
===========
1 mammal
2 fish
3 insect
PETS:
ID Name Foreign Key
=======================
1 Paris 1 (mammal)
2 Michael 2 (fish)
3 Mardy 1 (mammal)
How on earth do i recreate this in CRM? I know CRM likes to create its own primary key GUIDs and relalationship fields. I want to keep the integrity of my tabular relationships particularly due to the fact that i will be importing large amounts of data (1million + records) via a script on a regular basis rather than creating the records and relationships via the crm gui. Thanks.
Since CRM stores its PKs as GUIDs you can only define FKs only via those GUIDs.
As lazarus stated, create both Pets and PetTypes entities included an
ExternalID intfield.Your import script needs to look up both GUIDs for every record to be imported: