简体   繁体   English

数据库表2NF

[英]database table 2NF

I'm marking assignments and I may have complicated things more for myself. 我正在分配作业,我自己可能会遇到更复杂的事情。 I asked for tables to be 2NF at a minimum. 我要求表格最小为2NF。 I understand the 2NF definition but for some reason I can't get through it with this example. 我了解2NF的定义,但是由于某些原因,我无法通过此示例来理解它。 If they create a contributor table with the key being either SSN (or SIN for Canucks) and then add in the person's address information to the table, is it still 2NF? 如果他们创建的贡献者表的键是SSN(对于Canucks,则为SIN),然后将该人的地址信息添加到表中,它是否仍是2NF? Thanks. 谢谢。

EG: 例如:

PK int, PersonName nvarchar(200), StreetNumber int, StreetName nvarchar(200), City nvarchar(200), ZIP nvarchar(10), -- postalcode in CDN PK int,PersonName nvarchar(200),StreetNumber int,StreetName nvarchar(200),City nvarchar(200),ZIP nvarchar(10),-CDN中的邮政编码

As long as you only want to support a single address per person. 只要您只希望每人支持一个地址。

The candidate key is the integer "pk" and every column is related to it ans only it. 候选关键字是整数“ pk”,并且每一列都与其相关,并且仅与之相关。 If you were to have two rows (for two addresses) and had to copy the person name twice, then it would not be 2NF. 如果您要有两行(用于两个地址),并且必须复制两次个人姓名,那么它将不是2NF。

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

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