Schema decisions made in week one echo for years. Here are five that look harmless at launch and become expensive at scale.
1. Storing money as floats
Floating-point rounding and currency don’t mix. Use integers (cents) or a decimal type. Always.
2. No soft-delete strategy
Hard deletes destroy audit trails and break foreign keys. Decide your deletion model early.
3. Premature denormalization
Denormalize for measured performance problems, not imagined ones. It’s far easier to denormalize later than to re-normalize.
4. Unbounded columns with no indexes
The query that’s instant at 10k rows is a full table scan at 10M. Index for your real access patterns.
5. Enums as raw strings
Free-text status columns drift into chaos. Constrain them at the database level.