简体   繁体   English

归一化为3NF

[英]Normalization to 3NF

Is the following table in 3NF: 下表是3NF:

Customer(CustomerID, CustomerName, DOB, Phone, Address)

I am specially interested to know if the address field should be in this table or should it be further decomposed. 我特别想知道地址字段应该在此表中还是应该进一步分解。

To give a precise answer about what is in normal form and what isn't requires knowledge of what keys and dependencies are supposed to be in effect. 要给出关于什么是正常形式以及什么不是正常形式的精确答案,需要知道哪些键和依赖项应该有效。 Here we have only attribute names to go on so any direct answer to your question can only be guesswork. 在这里,我们只保留属性名称,因此对您问题的任何直接答案都只能是猜测。

My guess is that the Customer table specified is in 3NF. 我的猜测是指定的Customer表在3NF中。 If CustomerID is the only key and if none of the other non-key attributes are determinants then the table as specified is in 3NF. 如果CustomerID是唯一键,并且其他所有非键属性都不是决定因素,则指定的表位于3NF中。

It depends on the relationship between the customer and the address. 这取决于客户和地址之间的关系。 If one-to-one, then you are in 3NF. 如果一对一,则说明您处于3NF模式。 If not, then you need to split out the address into another table. 如果不是,则需要将地址拆分到另一个表中。 An additional consideration is the relationship between the address and other entities? 另外需要考虑的是地址与其他实体之间的关系? If other entities need customer addresses, you definitely need another table. 如果其他实体需要客户地址,则您肯定需要另一个表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM