3 ms·
Putting on my dogmatic 3NF purist hat. Instead of denormalized user.residence1 -> country.id user.residence2 -> country.id I would create a many to many
by rawgabbit 2y ago
Putting on my dogmatic 3NF purist hat. Instead of denormalized
user.residence1 -> country.id
user.residence2 -> country.id
I would create a many to many bridge table. To accommodate multiple residences for a given user.
bridge.userid-> user.id
bridge.countryid-> country.id
- Izkata 2y agoOh definitely, I just couldn't think of a better example off the top of my head. But also not really relevant: You could also have another table and the relationships be A -> B -> D and A -> C -> D, with the desired join between A and D. Remember this whole thread is about the system figuring out the JOIN criteria automatically.