MySQL: Ten Rules for a Schema That Won't Betray You

I sat down and wrote up binding conventions for MySQL schema design, forcing myself to answer the question why for every single rule. That answer is half the value: a rule that can't defend itself is dogma, and the first unhappy colleague will rightly sweep it off the table. One idea runs through everything below: the database is integrity's last line of defence. The application validates for the…