or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
tags:
Data Base
第十章: Relational Database Design I
Measures of Quality
重複資訊會造成的異常現象(anomalies)
Anomalies 的問題
Anomalies 種類
NULL Values in Tuples
NULL 的問題
使用 NULL 的時機
Spurious(虛假) Tuples
Functional Dependencies(FDs)
Use of FDs
Inference Rules for FDs
Armstrong's inference rules:
Armstrong's inference rules 完備了 inference rules
還有額外的 inference rules(可推導):
Closure
Equivalence of Sets of FDs
if 所有 FD in F 可以被 G 推導
if 所有 FD in G 可以被 F 推導
Definition(Covers):
F cover G and G cover F => F and G 是等價
Minimal Sets of FDs(1)
Normalization of Relations
大部分做到 3NF, BCNF, 4NF
要求目標
Promblem with Decompositions
Keys and Attributes
First Normal Form
Disallows:
method:
Example:


multivalue resolve
nested relations
Second Normal Form
Uses the concepts of FDs, primary key
目標:
method:
Definitions:
2NF: 所有 non-prime attribute A in R(table) 都是 fully functionally dependent on the primary key
R 可以藉由 2NF normalization 分解成 2NF relations
(以 candidate 為主軸,一個個把不同 prime attribute 的表組合起來)
(只最少的 attribute 就可以辨認出單一 attribute ,把它變成表)
Third Normal Form
目標:
如何找出遞移關係
1.如果有存在時,則代表有「遞移相依」的關係
2.如果有不存在時,則代表沒有「遞移相依」的關係
method:
Transitive dependency: FD X -> Z 可以從 X -> Y and Y -> Z推導
如果表 R 是 2NF 且沒有 non-prime attribute A in R 是跟 pk 有 tansitively dependent 關係,稱之為 3NF
利用 3NF normalization 可做出 3NF relations
例如: X -> Y 且 Y -> Z 且 X \(\in\) PK,接下來考慮是否 Y \(\in\) candidate key
It is fully functionally dependent on every key of R.
It is nontransitively dependent on every key of R.
Normalization into 2NF and 3NF
Normal Forms Defined Informally
BCNF(Boyce-Codd Normal Form)
Modeling Temporal Data