MySQL Forums
Forum List  »  InnoDB

Re: Foreign Key problems
Posted by: Rick James
Date: September 14, 2014 11:07PM

> an alternative to foreign keys

A database can work perfectly well without any FOREIGN KEYs defined in any tables. Simply don't declare them when CREATEing TABLEs and don't add them later.

You can also get away without any INDEXes, too. But that usually leads to terrible performance.

> SET foreign_key_checks = 0;

That's a kludge useful in certain rare circumstances. Not the situation you are in.

Options: ReplyQuote


Subject
Views
Written By
Posted
1577
September 12, 2014 10:46PM
824
September 13, 2014 09:18PM
859
September 14, 2014 02:39AM
863
September 14, 2014 01:15PM
1127
September 14, 2014 07:40PM
888
September 14, 2014 09:37PM
Re: Foreign Key problems
886
September 14, 2014 11:07PM
938
September 15, 2014 07:26AM
1065
September 15, 2014 11:08AM
878
September 15, 2014 03:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.