4 ms·
Northwind Traders
by the-dude 7y ago
Northwind Traders
- dwd 7y agoThat made me laugh. My 2 cents after doing this long enough to recognise it - Aim for 3NF but not religiously. Still, if you need a flat table try a view. - Any ternary relationship can be modeled as a pair of binary relations (you'll never regret keeping it simpler) - You don't need EAV (Magento is a good example of why you shouldn't) - On the other hand don't serialize data (looking at you WordPress) - XML and JSON data types though are perfectly fine when you need to store an object - Every table should have a primary key (preferably an integer) - If you really want a string for your primary key make it a candidate key (why, because someone will insist on changing it) - E/R diagrams are your friend - So are Venn diagrams for visualizing a complex select