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 ...
随机推荐
- android 下载图片出现SkImageDecoder::Factory returned null,BitmapFactory.Options压缩
网上有很多说是因为没有采用HttpClient造成的,尼玛,我改成了HttpClient 请求图片之后还是会出现SkImageDecoder::Factory returned null, 但是直接使 ...
- 科学技术法转成BigDemcial
目的:将类似“-412615050624334534247E-3”转成“-412615050624334534.247” 工具:用到BigDemcial Code: public static voi ...
- [工作积累] android 中添加libssl和libcurl
1. libssl https://github.com/guardianproject/openssl-android 然后执行ndk-build 2.libcurl 源代码组织结构, 下面的mak ...
- linux下解压命令大全(转载)
.tar 解包:tar xvf FileName.tar 打包:tar cvf FileName.tar DirName (注:tar是打包,不是压缩!) ——————————————— .gz 解压 ...
- CSS预处理器实践之Sass、Less大比拼[转]
什么是CSS预处理器? CSS可以让你做很多事情,但它毕竟是给浏览器认的东西,对开发者来说,Css缺乏很多特性,例如变量.常量以及一些编程语法,代码难易组织和维护.这时Css预处理器就应运而生了.Cs ...
- 关于android的分辨率
关于Android的分辨率支持,为大家翻译官方文档 看世界杯的空闲时间,翻译一下官方文档.分辨率问题是大家都很关心的(720×480会不会悲剧),而关于这个问题,android官方的文档无疑最有说服力 ...
- Linux下安装Scim-googlepinyin输入法和设置Sublime Text中文输入
1.安装git sudo apt-get install git http://www.cnblogs.com/perseus/archive/2012/01/06/2314069.html 2.获取 ...
- HDU 4027 Can you answer these queries?(线段树的单点更新+区间查询)
题目链接 题意 : 给你N个数,进行M次操作,0操作是将区间内的每一个数变成自己的平方根(整数),1操作是求区间和. 思路 :单点更新,区间查询,就是要注意在更新的时候要优化,要不然会超时,因为所有的 ...
- 【OpenCV入门教程之二】 一览众山小:OpenCV 2.4.8组件结构全解析
转自: http://blog.csdn.net/poem_qianmo/article/details/19925819 本系列文章由zhmxy555(毛星云)编写,转载请注明出处. 文章链接:ht ...
- ARM 汇编指令
ARM汇编程序特点: l 所有运算处理都是发生通用寄存器(一般是R0~R14)的之中.所有存储器空间(如C语言变量的本质就是一个存储器空间上的几个BYTE).的值的处理,都是要传送到通 ...