Nothing but the key 属性全部依赖于主键 third norm form
全依赖
Designs that Violate 1NF
Customer
Customer ID First Name Surname Telephone Number
123 Pooja Singh 555-861-2025, 192-122-1111
456 San Zhang (555) 403-1659 Ext. 53; 182-929-2929
789 John Doe 555-808-9633
Designs that Comply with 1NF
Customer Name
Customer ID First Name Surname
123 Pooja Singh
456 San Zhang
789 John Doe
Customer Telephone Number
Customer ID Telephone Number
123 555-861-2025
123 192-122-1111
456 (555) 403-1659 Ext. 53
456 182-929-2929
789 555-808-9633
NOT 2NF
Manufacturer | Model | Model Full Name | Manufacturer Country |
---|---|---|---|
Forte | X-Prime | Forte X-Prime | Italy |
Forte | Ultraclean | Forte Ultraclean | Italy |
Dent-o-Fresh | EZbrush | Dent-o-Fresh EZbrush | USA |
Kobayashi | ST-60 | Kobayashi ST-60 | Japan |
Hoch | Toothmaster | Hoch Toothmaster | Germany |
Hoch | X-Prime | Hoch X-Prime | Germany |
Even if the designer has specified the primary key as {Model Full Name}, the relation is not in 2NF because of the other candidate keys. {Manufacturer, Model} is also a candidate key, and Manufacturer Country is dependent on a proper subset of it: Manufacturer. To make the design conform to 2NF, it is necessary to have two relations:
Electric Toothbrush Manufacturers
Manufacturer Manufacturer Country
Forte Italy
Dent-o-Fresh USA
Kobayashi Japan
Hoch Germany
Electric Toothbrush Models
Manufacturer Model Model Full Name
Forte X-Prime Forte X-Prime
Forte Ultraclean Forte Ultraclean
Dent-o-Fresh EZbrush Dent-o-Fresh EZbrush
Kobayashi ST-60 Kobayashi ST-60
Hoch Toothmaster Hoch Toothmaster
Hoch X-Prime Hoch X-Prime
1-值具有原子性,比如客户的电话号码单行至多一个号码;
2-“不能既有主键又有复合主键”:行仅有一种唯一性体现方式;
3-An approximation of Codd's definition of 3NF, paralleling the traditional pledge to give true evidence in a court of law, was given by Bill Kent: "[Every] non-key [attribute] must provide a fact about the key, the whole key, and nothing but the key."[7] A common variation supplements this definition with the oath: "so help me Codd".[8]
https://en.wikipedia.org/wiki/Third_normal_form
最新文章
- Sql Server系列:视图
- vim 标签命令
- dock停靠管理器
- 【Linux】Zabbix + MPM + msmtp + mutt 监控MySQL + 邮件报警
- 我的博客模板(线框图wireframe)
- 深入分析iSCSI协议的应用
- [序列化] Serialize--序列化帮助类 (转载)
- android linearlayout imageview置顶摆放
- Chapter 1 Securing Your Server and Network(10):使用扩展保护避免授权中继攻击
- 我是如何给discuz模板做语法高亮的
- vbs和qtp一些脚本
- POSIX 消息队列相关问题
- Dynamics CRM 窗体Javascript获取时间字段值的准确转换
- ffplay.c函数结构简单分析(画图)
- 协程demo,1异步爬网页 2异步socket请求
- WPF 通过线程使用ProcessBar
- centos7 安装python2.7与3共存
- BootStrap学习(4)_分页&;标签&;缩略图&;警告&;进度条
- .netLinq动态Where条件
- sql like 语句
热门文章
- 使用 IntelliJ IDEA 开发 Android 应用程序时配置 Allatori 进行代码混淆
- 信号板拼包:数组方式(bug长度只是截短,并未清空,若之后拷贝数据长度小于之前数据长度,老数据会接在后面)
- 设置USB数据监听
- XSY1036 [Apio2012]派遣
- Maven插件maven-antrun-plugin的使用
- systemtap-oracle
- android 根据图片名字获取图片id
- OracleCPU使用情况查询
- Zxing二维码精简(竖屏、拉伸处理、扫描框大小和扫描线移动)
- python解析xml文件时使用ElementTree和cElementTree的不同点;iter