Database: Normal form
refer to wikipedia---
1NF(first normal form):
1. There's no top-to-bottom ordering to the rows.
2. There's no left-to-right ordering to the columns.
3. There are no duplicate rows.
4. Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else).
5. All columns are regular [i.e. rows have no hidden components such as row IDs, object IDs, or hidden timestamps].
2NF(second normal form):
if and only if it is in 1NF and every non-prime attribute of the table is dependent on the whole of a candidate key.
A non-prime attribute of a table is an attribute that is not a part of any candidate key of the table.
Not all 2NF tables are free from update anomalies.
A table for which there are no partial functional dependencies on the primary key is typically, but not always, in 2NF.
3NF(third normal form):
The relation R (table) is in 2NF
Every non-prime attribute of R is non-transitively dependent (i.e. directly dependent) on every superkey of R.
A transitive dependency is a functional dependency in which X → Z (X determines Z) indirectly, by virtue of X → Y and Y → Z (where it is not the case that Y → X).
Requiring existence of "the key" ensures that the table is in 1NF; requiring that non-key attributes be dependent on "the whole key" ensures 2NF; further requiring that non-key attributes be dependent on "nothing but the key" ensures 3NF.
BCNF(3.5 normal form):
If a relational schema is in BCNF then all redundancy based on functional dependency has been removed, although other types of redundancy may still exist. A relational schema R is in Boyce–Codd normal form if and only if for every one of its dependencies X → Y, at least one of the following conditions hold:[4]
- X → Y is a trivial functional dependency (Y ⊆ X)
- X is a superkey for schema R
A 3NF table which does not have multiple overlapping candidate keys is guaranteed to be in BCNF. Depending on what its functional dependencies are, a 3NF table with two or more overlapping candidate keys may or may not be in BCNF
3NF:只消除非主属性对主属性的传递依赖;
BCNF:消除所有属性对主属性的传递依赖。
4NF(forth normal form):
A Table is in 4NF if and only if, for every one of its non-trivial multivalued dependencies X Y, X is a superkey—that is, X is either a candidate key or a superset thereof.
A trivial multivalued dependency X Y is one where either Y is a subset of X, or X and Y together form the whole set of attributes of the relation.
Database: Normal form的更多相关文章
- 【Normal Form】数据库表结构设计所遵从的范式
参考的优秀文章 数据库(第一范式,第二范式,第三范式) 数据库设计是件严肃.关键的事儿,一毕业,加入一个大型的行业项目,那儿的前辈资深工程师,就给我灌输数据库如何关键.神圣.深不可测的观念,所以,我一 ...
- 关系数据库 范式(NF: Normal Form) 说明
关系数据库 范式(NF: Normal Form) 说明 数据库电话insertdelete存储oracle 目录(?)[+] 一.范式概述(NF:NormalForm) 数据库的设计范式是数 ...
- First normal formal Second normal form
https://en.wikipedia.org/wiki/First_normal_form https://en.wikipedia.org/wiki/Second_normal_form A r ...
- 数据库概念:码 键 Key & 范式 Normal Form
参考资料 数据库管理系统原理与设计(Database Mangement System 3rd) 百度 wiki 术语对照 码 = 键 = Key 码约束 = Key Constraints 码约束 ...
- 数据库范式小结 1NF 2NF BCNF 3NF 4NF DB normal form
1. 1NF指关系中的每个变量不可再分 2. 2NF指消除了非主属性对码(candidate key)的部分依赖的1NF 比如(S#,C#)-> SN ,(S#,C#)-> SD .S#- ...
- Database,Uva1592
Peter studies the theory of relational databases. Table in the relational database consists of value ...
- [Database.System.Concepts(6th.Edition.2010)].Abraham.Silberschatz. Ch8学习笔记
Database Ch8.relational design 8.1 features of good design 8.1.1 larger alternatives why design is g ...
- UVa 1592 Database(巧用map)
Peter studies the theory of relational databases. Table in the relational database consists of value ...
- 数据库设计(二)Introduction to Database Design
原文链接:http://www.datanamic.com/support/lt-dez005-introduction-db-modeling.html Introduction to Databa ...
随机推荐
- Node.js 学习(五)Node.js 事件循环
Node.js 是单进程单线程应用程序,但是通过事件和回调支持并发,所以性能非常高. Node.js 的每一个 API 都是异步的,并作为一个独立线程运行,使用异步函数调用,并处理并发. Node.j ...
- 网站中的专题页或者tag聚合页的权重不错
一.据最近的一些观察,觉得网站中的专题页或者tag聚合页的权重不错,因此多给网站制作一些专题页面,不仅有利于聚合站内的文章,更是绝对的原创内容,应该会受到百度的青睐.简评:关于权重的讨论,这篇无疑是很 ...
- 也发一个自己实现的android简单文件选择器代码。支持多卡,排序
一个很简单的文件选择器对话框,支持双sd卡,当然前提是要有sd卡..并且实现了排序效果. 只有100多行的代码,基本的思路就是用listview显示目录下的所有子文件,再判断是文件还是目录. 利用Co ...
- 新装Centos常见问题及解决方案
1.可以ping通,但无法通过ssh连接虚拟机的解决方案 虚拟机上装了一个 Linux 玩玩, 但在启动 Linux 后,在 Windows 中通过 Xshell 以 SSH 方式连接到 Linux ...
- html5之canvas练习
代码地址:github.com/peng666/blogs 在线地址:http://peng666.github.io/blogs/
- 【CentOS】IBM X3650M4 IMM远程管理【转载】
问题描述: IBM X3650M4 IMM远程开机和关机 参考资料: http://www.ibmsys.cn/blog/?p=201 问题解决: 一 ...
- boost之bind
bind1st bind2nd在stl里面有具体的实现,只是只能绑定两个参数. boost里面的bind使用bind(Fun f,A1 a1,A2,a2...)产生一个对象,这个对象可以有占位符,可以 ...
- C++中static的全部作用
要理解static,就必须要先理解另一个与之相对的关键字,很多人可能都还不知道有这个关键字,那就是auto,其实我们通常声明的不用static修饰的变量,都是auto的,因为它是默认的,就象short ...
- What does addScalar do?
The JavaDoc says: SQLQuery org.hibernate.SQLQuery.addScalar(String columnAlias, Type type) Declare a ...
- 修改DevExpress中英文提示,将英文改为中文
1 : 修改DX 提示框中的英文字符 /// <summary> /// 重写DX弹出框 英文变为中文 /// </summary> public class CHS : De ...