How do you choose what you usually choose between the foreign key and the table link?
Between Foreign key and table Link
Reply content:
How do you choose
Between Foreign key and table Link
Let's see the scenario. For example, if you have a table to store product data and another table to store the product type, there is no foreign key at this time.
If you have a table that stores order data, another table that stores customer information, a table that stores product information, and a table that stores store information, it will be slow to use a foreign key.
I don't know much about it either. Let's take a look at it. If you need it, translate it for you.
Http://stackoverflow.com/questions/83147/whats-wrong-with-foreign-keys
When you want to delete data from a large table, you will understand the various restrictions. Of course, if your model is well designed, these can also be avoided.
In the two maintenance projects I am currently responsible for, except for configuration tables, I seldom use foreign keys to associate
Some colleagues wrote Foreign keys during my internship at Microsoft, which caused many problems. Then I mentor said, "Do not add Foreign keys. In my opinion, foreign keys are used for plotting ."
Dirty data is easy to appear without foreign keys.
You cannot discard food for any reason.