When storing external data, I usually have two ids. One is external and one is internal. I inevitably need to keep indexes on both ids for lookups. Examples:
- Storing stripe customers, products, ids
- Storing shopify products, images, variants, etc.
- Any external data really
QUESTIONS:
Is this just a necessary part of storing external data or can I be using the external ids only?
Which ids should I use as relational keys between my tables internally?
- External ids
- Internal ids
- Both internal and external ids
In terms of column naming, is it common to have:
id
andexternal_id
internal_id
andexternal_id
; orid
andshopify_product_id