News for hackers. Stuff that matters.
Re:Making Database Systems Usable by rawgabbit on Thursday August 22, 2024 @11:57PM (#41326074)
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
Re:Making Database Systems Usable by Izkata on Friday August 23, 2024 @06:25PM (#41333609)
Oh 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.