How do you determine how far to normalize a database?

前端 未结 13 2163
醉梦人生
醉梦人生 2020-11-29 06:36

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

13条回答
  •  长情又很酷
    2020-11-29 07:16

    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

提交回复
热议问题