您如何确定规范化数据库的程度? [英] How do you determine how far to normalize a database?

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

问题描述

在创建数据库结构时,要遵循哪些好的指导方针或确定数据库应该规范化多远的好方法?您是否应该创建一个非规范化的数据库并随着项目的进展将其拆分?您是否应该创建完全规范化并根据性能需要组合表?

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 种形式.始终保持第一种和第二种形式的合规性.为了代码的简单性,而不是为了性能,您想要非规范化.为此使用索引和存储过程:)

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.

有几篇不错的文章:

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

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

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