How do you choose the usual
Between the outer key and the table link
Reply content:
How do you choose the usual
Between the outer key and the table link
Look at the situation, for example, you have a table to store product data, another table for the product type, this time with foreign keys and nothing
If you have a table that holds order data, another table that stores customer information, a table that stores product information, and a table that stores information about the store, then the foreign key will be slow
I do not understand ha, look at the bottom, if necessary to translate for you
Http://stackoverflow.com/questions/83147/whats-wrong-with-foreign-keys
When you want to delete a large table data, you know, various restrictions, of course, if your model is well designed, these can also be avoided
I am now in charge of two maintenance projects, in addition to the configuration table, rarely using foreign keys to correlate what
When I was practicing at Microsoft, a colleague wrote a foreign key that caused a lot of problems. Then I mentor said: "Do not add foreign keys, in my opinion, the foreign key is used for drawing." ”
No foreign keys are prone to dirty data.
Can't unworthy.