News for hackers. Stuff that matters.
Re:GitHub's online schema migration for MySQL by cup-of-tea on Thursday May 03, 2018 @07:54AM (#16985097)
Yeah, but from a data integrity point of view that is horrifying. I guess they must have some very comprehensive testing framework to validate the code.

Also, pardon my further ignorance, but if you're not going to use foreign key constraints, what is the point of using a relational db? Why not just a fast key-value store for each index?

Re:GitHub's online schema migration for MySQL by fipar on Thursday May 03, 2018 @09:44AM (#16985935)
You may me able to architect your application to do well-enough without Foreign Keys yet still require features that key-value stores do not provide, like SQL, triggers, etc.

In the specfic case of MySQL, while still horrifying (I agree with you! but it is one of the things you some times have to do at scale), you can create the Foreign Key constraints but then disable their verification and periodically look for violations, as described here: https://www.percona.com/blog/2011/11/18/eventual-consistency...

Re:GitHub's online schema migration for MySQL by zzzeek on Thursday May 03, 2018 @11:52AM (#16987056)
The application still has foreign key references and JOIN, which you don't get in a k/v store, you just don't have the actual CONSTRAINT. MySQL worked this way for literally decades with the MyISAM storage engine that does not have referential integrity constraints, it just allows the FOREIGN KEY syntax to pass silently.