Monday, June 8, 2015

10 Rules for a Better SQL Schema

Summary:



1. Only Use Lowercase Letters, Numbers, and Underscores

2. Use Simple, Descriptive Column Names

3. Use Simple, Descriptive Table Names

4. Have an Integer Primary Key

5. Be Consistent with Foreign Keys

6. Store Datetimes as Datetimes

7. UTC, Always UTC

8. Have One Source of Truth

9. Prefer Tall Tables without JSON Columns

10. Don't Over-Normalize