Yes, foreign keys are necessary
Whatever the reason, by putting the data validation as close as possible to the data munging, you make it harder to circumvent.
I’m a stickler for clean data. A while ago I came across an interview with one of the senior EBay architects and he mentioned that they don’t use them. And it makes absolute sense for them.
In most of cases, there is no need to bypass foreign keys in the name of performance. Mr. Ted, said it best:
You’re going to get, at most, 1,000 people on your app, and maybe 1% of them will be 7-day active. Scalability is not your problem, getting people to give a shit is.
| Print article |