News for hackers. Stuff that matters.
Re:Trying to sneak in a sketchy .so over the weekend by jniedrauer on Sunday February 09, 2020 @09:17PM (#22285871)
> His mySQL tables used no foreign keys, only int fields.

This one is potentially justifiable if speed is a higher priority than data integrity.

Re:Trying to sneak in a sketchy .so over the weekend by redis_mlc on Sunday February 09, 2020 @11:39PM (#22286467)
Most MySQL applications don't use FKs. The world keeps turning.

Besides performance issues, FKs cause ordering issues with restoring tables when necessary.

However, they're great for diagramming tools to show table relationships.

I'm more concerned when I don't see unique indexes on things that need to be unique (often caused by early versions of RoR.) In my experience, this is never a theoretical problem - it always becomes a major operational problem.

Source: MySQL DBA

Re:Trying to sneak in a sketchy .so over the weekend by cookiecaper on Monday February 10, 2020 @01:28AM (#22286852)
Also, depending on how long ago this was, may not have been as bad as it sounds -- MyISAM doesn't support foreign keys, and it was the default all the way until MySQL 5.5 in 2010.
Re:Trying to sneak in a sketchy .so over the weekend by pier25 on Sunday February 09, 2020 @09:48PM (#22286025)
Ok, but no, this was incompetence. The application he managed had around 10k users that used it a couple of times per year.