Lecture 06. Relational database design

First Normal Form

atomic

Functional dependencies

The functional dependency α → β holds on R if and only if for any legal relations r®, whenever any two tuples t1 and t2 of r agree on the attributes α, they also agree on the attributes β, i.e., t1[α] = t2[α] ⟹ t1[α] = t2[β]

Trivial: α → β, if β ⊆ α (平凡的函数依赖)

Non-trivial: α → β , if β ⊈ α (非平凡的函数依赖)

Closure

The set of all functional dependencies logically implied by F is the closure of F, denoted by F+ (函数依赖集F的闭包)

E.g., F = {A → B, B → C}, F+ = {A → B, B → C, A → C, A α A, AB → A, AB → B, AC → C, A → BC, …}

Armstrong’s Axioms provide inference rules to find F+.

We can find all of F+ by applying Armstrong’s Axioms:

If β ⊆ α, then α → β (reflexivity, 自反律) — trivial

If α → β, then ?α → ?β (?α → β) (augmentation, 增补律)

If α → β, and β → ?, then α → ? (transitivity, 传递律)

If α → β and α → ? holds, then α → β? holds (union, 合并律)

If α → β? holds, then α → β and α → ? holds (decomposition, 分解律)

If α → β and β? → δ holds, then α? → δ holds (pseudotransitivity, 伪传递律)

Canonical cover(正则覆盖)

minimal set of functional dependencies in F

Dependency preservation(依赖保持)
lossless-join 无损分解

R 1 ⋂ R 2 → R 1 o r R 1 ⋂ R 2 → R 2 R_1 \bigcap R_2 \rightarrow R_1 or R_1 \bigcap R_2 \rightarrow R_2 R1R2R1orR1R2R2

Boyce-Codd Normal Form 在这里插入图片描述
3NF在这里插入图片描述

If a relation is in BCNF, it is in 3NF.

https://www.cnblogs.com/langdashu/p/5924082.html

BCNF 无损分解:https://blog.csdn.net/panxiqie___/article/details/38899021

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Relational databases have been around now for more than 20 years. In their early days, performance problems were widespread due to limited hardware resources and immature optimizers, and so performance was a priority consideration. The situation is very different nowadays; hardware and software have advanced beyond all recognition. It’s hardly surprising that performance is now assumed to be able to take care of itself! But the reality is that despite the huge growth in resources, even greater growth has been seen in the amount of information that is now available and what needs to be done with this information. Additionally, one crucial aspect of the hardware has not kept pace with the times: Disks have certainly become larger and incredibly cheap, but they are still relatively slow with regards to their ability to directly access data. Consequently many of the old problems haven’t actually gone away—they have just changed their appearance. Some of these problems can have enormous implications— stories abound of “simple” queries that might have been expected to take a fraction of a second appear to be quite happy to take several minutes or even longer; this despite all the books that tell us how to code queries properly and how to organize the tables and what rules to follow to put the right columns into the indexes. So it is abundantly clear that there is a need for a book that goes beyond the usual boundaries and really starts to think about why so many people are still having so many problems today.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值