如何确定数据库规范化有多远? [英] How do you determine how far to normalize a database?

查看:116
本文介绍了如何确定数据库规范化有多远?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建数据库结构时,要遵循哪些好的指导方针或确定数据库应该被归一化程度的好方法?您应该创建一个未归一化的数据库,并在项目进展时将其拆分您是否应该根据需要创建完整的规范化和组合表?

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?

推荐答案

您想开始设计一个标准化数据库,正常形式当您开发业务逻辑层时,您可能会决定不必对其进行非规范化,但永远不要进入第3种形式。始终遵守第1和第2表格。您希望为了简化代码而非规范化,而不是性能。使用索引和存储过程:)

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 1rd 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.

有几个好的文章:

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

这篇关于如何确定数据库规范化有多远?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆