Consider a user can have multiple addresses. There is a users table, an addresses table, and a user_addresses table that links addresses and users with a many to many relationship.
Users can define what their default address is.
Is it best to have the users table have a default_shipping_id column linking to the appropriate entry on user_addresses, or should the user_addresses table have a is_default column?
Users table
| ID | name | default_user_address_id |
|---|---|---|
| -------- | -------------- | -------------- |
v.s.
User_addresses table
| ID | user_id | address_id | is_default |
|---|---|---|---|
| -------- | -------------- | -------------- | -------------- |
What's the better approach here?