| |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
-> 大数据 -> 数据库设计步骤与案例(by microsoft /github tutor repository)/数据库基本概念(主键/外键/主属性/码/关系/关系型/关系模式/依赖)/3NF -> 正文阅读 |
|
[大数据]数据库设计步骤与案例(by microsoft /github tutor repository)/数据库基本概念(主键/外键/主属性/码/关系/关系型/关系模式/依赖)/3NF |
文章目录数据库基础(reference links)microsoft learn 参考教材
关系型/关系值(与关系,笛卡尔积之间的联系)的例子
码/主键/外键/主属性码与键指的是相同的东西 这两个概念基于关系(模式)的概念
依赖overview依赖是属性(或属性与主键属性集)之间的一种关系描述: 依赖函数集实例记号说明(notation)这里的箭头表示"决定之意": 函数依赖对于元组t1,t2: 完全依赖部分依赖可以理解为这是一种带有冗余的依赖(仅在主键由多列属性构成时存在的依赖类型) 示例传递依赖个人认为部份依赖与完全依赖是一对相对概念(对立关系) overview for normal form
1NFFirst normal form states that at every row and column intersection(交集) in the table there, exists a single value, and never a list of values. For example, you cannot have a field named Price in which you place more than one Price. If you think of each intersection of rows and columns as a cell, each cell can hold only one value. 1NF 分解案例做拆分处理使之满足1NF
2NFSecond normal form requires that each non-key column be fully dependent on the entire primary key, not on just part of the key. This rule applies when you have a primary key that consists of more than one column. For example, suppose you have a table containing the following columns, where Order ID and Product ID form the primary key:
This design violates second normal form, because Product Name is dependent on Product ID, but not on Order ID, so it is not dependent on the entire primary key. You must remove Product Name from the table. It belongs in a different table (Products).
2NF分解案例3NFThird normal form requires that not only every non-key column be dependent(依赖) on the entire primary key, but that non-key columns be independent(独立) of each other. Another way of saying this is that each non-key column must be dependent on the primary key and nothing but the primary key. For example, suppose you have a table containing the following columns:
Assume that Discount depends on the suggested retail price (SRP). This table violates third normal form because a non-key column, Discount, depends on another non-key column, SRP. Column independence means that you should be able to change any non-key column without affecting any other column. If you change a value in the SRP field, the Discount would change accordingly, thus violating that rule. In this case Discount should be moved to another table that is keyed on SRP.
3NF分解案例
|
|
|
上一篇文章 下一篇文章 查看所有文章 |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 | -2024/11/24 5:51:23- |
|
网站联系: qq:121756557 email:121756557@qq.com IT数码 |