❔ If you needed to bulk sync data from an API into a DB, what would you use as a PK for child data?
For example imagine you get this data back HOURLY from GET /users:
You obviously would have a
dbo.user
table and a dbo.user_address
table.
dbo.user
would have PK Id
and dbo.user_address
would have an FK of UserId
. But what about a PK for the address table?
How could you possibly update an address without having a unique identifier from it? SHould I just TRUNCATE
followed by INSERT
?1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.