Link Details

Link 106191 thumbnail
User 111696 avatar

By bloid
via diovo.com
Published: Aug 22 2008 / 19:00

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.
  • 15
  • 2
  • 1811
  • 831

Comments

Add your comment
User 182143 avatar

mezmo replied ago:

1 votes Vote down Vote up Reply

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.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.