Many people responded and there were all kinds of opinions. The strange thing I noticed was that many people including Joel Spolsky do not use foreign keys in their databases.
A good topic, one I've had a lot of discussions about. My take is that you design your data model with certain assumptions, like in an address, if you select a state it will actually be in the country the address is in, if you use foreign keys to document/enforce that the rule is enforced no matter who uses the data, rather than relying whomever creates the fronting applications to get it right each and every time, which face it, with the prevalence of Access and ODBC drivers on client desktops, we can't ensure.
Comments
mezmo replied ago:
A good topic, one I've had a lot of discussions about. My take is that you design your data model with certain assumptions, like in an address, if you select a state it will actually be in the country the address is in, if you use foreign keys to document/enforce that the rule is enforced no matter who uses the data, rather than relying whomever creates the fronting applications to get it right each and every time, which face it, with the prevalence of Access and ODBC drivers on client desktops, we can't ensure.
Voters For This Link (15)
Voters Against This Link (2)