

At GitHub we do not use foreign keys, ever, anywhere
source link: https://github.com/github/gh-ost/issues/331
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Hello,
Thanks for your hard work on gh-ost
!
As I familiarize myself with the way it all works, I noted that foreign keys are explicitly not supported , but that they may be to some extent in the future.
Looking through issues in the repo, I also noted this expected feature that the table has neither foreign keys pointing to other tables, nor foreign keys pointing to it.
Could you please expand on your thoughs about foreign keys, and what you mean by “some extent” for their potential support? I am also curious: does this limitation mean that you don’t use foreign keys at all in GitHub’s MySQL databases, or do you use them and manage those tables somehow differently?
Thanks for your time and consideration!
Recommend
-
6
Rails ActiveRecord PostgreSQL Foreign Keys and Data Integrity Updated Jun 28, 2019 5 minute read
-
15
More Laziness with Foreign Keys Tue, Nov 4, 2008Yesterday we looked at building a form field to make the process of getting a ForeignKey to the User model more simple, and to provide us with some useful tools, like the manager...
-
8
Lazy User Foreign Keys Mon, Nov 3, 2008A very common pattern in Django is for models to have a foreign key to django.contrib.auth.User for the owner(or submitter, or whatever other relation with User) and then to have...
-
12
Index on primary and foreign keys advertisements I have a database created with a GUI tool and I've noticed what appears to be an inconsistent use...
-
7
Foreign Keys, Blocking, and Update Conflicts Most databases should make use of foreign keys to enforce referential integrity (RI) wherever possible. However, there is more to this decision than...
-
5
...
-
5
In SQL, what are the differences between primary, foreign, and unique keys? The one thing that primary, unique, and foreign keys all have in common is the fact that each type of key can consist of more than just one column
-
6
Should I Create an Index on Foreign Keys in PostgreSQL? Back to the Blog Welcome to a weekly...
-
14
Carlos Zavala February 13, 2022 2 minute read Ho...
-
8
<?xml encoding="utf-8" ??>Introduction In MySQL, referential integrity is a concept that maintains the relationship of data across multiple tables for consistency purposes. For instance, in an e...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK