Third Normal Form (3NF)

本文解释了数据库设计中第三范式的要求及其重要性。为了达到第三范式,除了满足第二范式的条件外,所有非主键字段必须直接依赖于主键,而非部分依赖或传递依赖。举例说明了如何通过分离表来消除传递依赖。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Definition: In order to be in Third Normal Form, a relation must first fulfill the requirements to be in Second Normal Form.  Additionally, all attributes that are not dependent upon the primary key must be eliminated.

Examples: The following table is NOT in Third Normal Form:

Company

City

State

ZIP

Acme Widgets

New York

NY

10169

ABC Corporation

Miami

FL

33196

XYZ, Inc.

Columbia

MD

21046

In this example, the city and state are dependent upon the ZIP code.  To place this table in 3NF, two separate tables would be created -- one containing the company name and ZIP code and the other containing city, state, ZIP code pairings.

This may seem overly complex for daily applications and indeed it may be.  Database designers should always keep in mind the tradeoffs between higher level normal forms and the resource issues that complexity creates.

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值