Alternate Download Site:
Subscribe to:
Post Comments (Atom)
The aim of this Blog is to provide a forum for raising questions and discussing the paper on Foreign Keys.
Download the Discussion Paper from here.
http://www.eternal-donut.com/downloadp/foreign_key_discussion_kratochvil_v11.pdf
The only rule that I ask is that you read the whole paper (in its entirety) before making any comments.
Don't forget that in logical E/R modeling you specify relationships with optionality and cardinality on both ends. This translates to a physical design that may allow NULL values for the foreign key. It also helps you decide in physical design which table gets the foreign key - always the "many" end of the relationship. Many to many relationships can be diagrammed with or without an intermediate entity, but are always implemented with an intersection table.
ReplyDeleteSome of the problems with foreign keys that you note in your paper are actually due to improper design, or failure to carefully check your design. For instance, you give an example where an order has a foreign key to an account, but you have a legal requirement to be able to delete the account. Obviously, this is therefore an optional foreign key, in which case you can NULL the key and delete the account without a problem.