关于dbms中的规范化 [英] Regarding the normalisation in dbms

查看:93
本文介绍了关于dbms中的规范化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在归一化方面有一个问题。



为什么在第一范式中有一条规则,所有底层域都包含原子价值?



为什么数据库中需要原子价值?



我尝试过:



我读过与DBMS相关的书但不知道为什么存在原子价值规则。所以帮助我。

解决方案

Quote:

为什么首先有规则所有底层域包含原子值的正常形式?



因为1NF的目标与所有规范化的目标相同:防止可能变为冗余数据的可能性同步(因为如果你将客户地址存储在两个地方,当他们移动房屋时,很容易只更新其中一个)并准备将来的可扩展性。



虽然将逗号分隔列表中的电话号码列表(例如)存储为单列很容易,但复制这些号码也很容易,因为该字段只是文本并包含多个值。 1NF要求每列都是原子的:它可以保存一个且只有一个值,包括消除所谓的重复组,例如电话号码列表。通过将每个电话号码存储在其自己的原子列(和/或行)中并将其与其应用的客户相关联,您将结束对同一行的多次引用,更新时会自动更新所有引用数据。 / BLOCKQUOTE>

I have one question in normalisation.

Why there is a rule in first normal form that all underlying domain contain atomic value??

Why atomic value is required in database??

What I have tried:

I read the book related to DBMS but Not get why atomic value rule is there. So help me.

解决方案

Quote:

Why there is a rule in first normal form that all underlying domain contain atomic value?


Because the goal of 1NF is that the same as the goal of all normalisation: to prevent the possibility of redundant data that can become out of sync (because if you store a customer address in two places, when they move premises it's very easy to update just one of them for example) and prepare for future scalability.

While it's easy to store a list of telephone numbers (say) in a comma separated list as a single column, it's also very easy to duplicate those numbers, because the field is just text and contains multiple values. 1NF requires each column to be atomic: it can hold one and only one value, including the elimination of what are called "repeating groups" such as that list of telephone numbers. By storing each telephone number in its own atomic column (and / or row) and relating that back to the customer that it applies to, you end you with multiple references to the same row, which when updated automatically updates all the referencing data.


这篇关于关于dbms中的规范化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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