New answers tagged relational-theory
Got a good explanation from a user on a channel from freenode where I usually stay at. The person I argued with seems allergic to repeating values like, even if there's only 1 out of thousand of records he's willing to do his tables N-N. The user I talked to says, he seems to be a "classic DB people". Then he asked me this: "for your exact use case: ...
In theory, it is better you design a separate address table (without Person_fk in it), and then you can create an associate table, let's call it PersonAddress (Person_fk, Address_fk). This way, it does not matter where you have N:N relationship between Person and Address (i.e. a person may have multiple addresses or an address may host many persons).
The easiest and more realistic real world scenario to maintain and query is going to be either 1-1 or 1-N, choose whichever is appropriate for your business logic. Several of the products I've worked on have used either of these methods and they are far easier to maintain than trying to get N-1 to work. Maintaining N-1 for addresses would very challenging ...
Top 50 recent answers are included