Search code examples
database-designlanguage-agnosticdatabase-normalization

How do you determine how far to normalize a database?


When creating a database structure, what are good guidelines to follow or good ways to determine how far a database should be normalized? Should you create an un-normalized database and split it apart as the project progresses? Should you create it fully normalized and combine tables as needed for performance?


Solution

  • You want to start designing a normalized database up to 3rd normal form. As you develop the business logic layer you may decide you have to denormalize a bit but never, never go below the 3rd form. Always, keep 1st and 2nd form compliant. You want to denormalize for simplicity of code, not for performance. Use indexes and stored procedures for that :)

    The reason not "normalize as you go" is that you would have to modify the code you already have written most every time you modify the database design.

    There are a couple of good articles:

    http://www.agiledata.org/essays/dataNormalization.html