bcnf

3NF、BCNF和4NF基本概念和分解

只谈情不闲聊 提交于 2020-02-25 16:11:32
https://blog.csdn.net/yuyang_z/article/details/79115991 一、第三范式(3NF)——相对于BCNF,允许存在主属性对候选码的传递依赖和部分依赖 定义:如果关系模式R∈2NF,且每个非主属性都不传递函数依赖于R的主关系键,则称R属于第三范式,简称3NF。 1、把一个关系模式分解成3NF,使它具有保持函数依赖性 算法如下: 其中提到了最小函数依赖集,那么最小函数依赖集怎么求呢?方法如下: 举个例子:在R(U,F)中,U=ABCDEG,F={B→D,DG→C,BD→E,AG→B,ADG→BC} 1.1首先求最小依赖集 (1)右部属性单一化,F={B→D,DG→C,BD→E,AG→B,ADG→B,ADG→C} (2)去掉左边多余属性,只针对非单属性 DG→C,若去掉D,则(G)+=G不包含C,D保留(不冗余),若去掉G,(D)+=D不包含C,G保留 BD→E,(D)+=D,(B)+=BDE包含E,则可以B→E代替此函数依赖 AG→B,(G)+=G,(A)+=A ADG→B,(DG)+=DGC,(AG)+=AGB包含B,则可以由AG→B代替 ADG→C,(DG)+=DGC包含C,则可以由DG→C代替 所以最小依赖集F={B→D,DG→C,B→E,AG→B} (3)去掉多余的依赖 去掉B→D,(B)+=BE,不包含D,则不冗余,不去掉

Determining Super Key

喜欢而已 提交于 2020-02-25 03:45:22
问题 According to Wikipedia Today's Court Bookings Each row in the table represents a court booking at a tennis club that has one hard court (Court 1) and one grass court (Court 2) A booking is defined by its Court and the period for which the Court is reserved Additionally, each booking has a Rate Type associated with it. There are four distinct rate types: SAVER, for Court 1 bookings made by members STANDARD, for Court 1 bookings made by non-members PREMIUM-A, for Court 2 bookings made by

Is this relation in 3NF as well as in BCNF?

淺唱寂寞╮ 提交于 2020-01-06 12:51:21
问题 Suppose a relation schema R(A,B,C) and the FDs are {A -> B, B -> C} So the superkeys are {A}, {A,B} Now if we decompose it into 3NF it will be R1(A,B) with FD {A -> B} and R2(B,C) with FD {B -> C} Is it in BCNF ? I can't determine. Since B was not a superkey in R does {B -> C} in R2 violates BCNF ? 回答1: {AB} is a superkey, but it's not a candidate key. (It's not a minimal superkey.) The decomposition R 1 ( A B) R 2 ( B C) is in at least BCNF. Informally, a relation is in BCNF if every arrow

Specific BCNF decomposition

為{幸葍}努か 提交于 2020-01-05 08:56:59
问题 I'm trying to do a BCNF decomposition of the following relation: R(A,B,C,D,E,F) with functional dependencies: A -> DF B -> AC F -> E I get the superkey to B, and by following the decomposition algorithm for BCNF I get the following decomposition: R1{ADF}, R2{ABC} R3{FE} However, I suspect that R3 is not correct. Can anyone explain why, and where my error is? 来源: https://stackoverflow.com/questions/22437018/specific-bcnf-decomposition

What is a good KISS description of Boyce-Codd normal form?

非 Y 不嫁゛ 提交于 2019-12-31 08:29:29
问题 What is a KISS (Keep it Simple, Stupid) way to remember what Boyce-Codd normal form is and how to take a unnormalized table and BCNF it? Wikipedia's info: not terribly helpful for me. 回答1: Chris Date's definition is actually quite good, so long as you understand what he means: Each attribute Your data must be broken into separate, distinct attributes/columns/values which do not depend on any other attributes. Your full name is an attribute. Your birthdate is an attribute. Your age is not an

boyce codd and finding candidate keys

狂风中的少年 提交于 2019-12-24 14:06:59
问题 needing desperate help with understanding boyce codd and finding the candidate keys. i found a link here http://djitz.com/neu-mscs/how-to-find-candidate-keys/ which i have understood for most part but i get stuck e.g (A B C D E F) A B → C D E B C D → A B C E → A D B D → E right as far as i understand from the link i know you find the common sets from the left which is only B, and common sets from the right which are none now where do i go from here? i know all candidate sets will have B in

BCNF decomposition process

喜欢而已 提交于 2019-12-20 06:16:05
问题 What is the BCNF decomposition for these dependencies? A->BCD BC->DE B->D D->A What is the process to get to the answer? 回答1: We can first convert the relation R to 3NF and then to BCNF. To convert a relation R and a set of functional dependencies( FD's ) into 3NF you can use Bernstein's Synthesis . To apply Bernstein's Synthesis - First we make sure the given set of FD's is a minimal cover Second we take each FD and make it its own sub-schema. Third we try to combine those sub-schemas For

What is the difference between 3NF and BCNF?

岁酱吖の 提交于 2019-12-17 21:43:11
问题 Can someone please explain the difference between 3NF and BCNF to me? It would be great if you could also provide some examples. Thanks. 回答1: The difference between 3NF and BCNF is subtle. 3NF Definition A relation is in 3NF if it is in 2NF and no non-prime attribute transitively depends on the primary key. In other words, a relation R is in 3NF if for each functional dependency X ⟶ A in R, at least one of the following conditions are met: X is a key or superkey in R A is a prime attribute in

Decomposition to BCNF and set of super key

六月ゝ 毕业季﹏ 提交于 2019-12-13 02:54:37
问题 So I have this set of relation AB->CDEF G->H,I ABJ->K C->L How should I decompose this? I am so confused. Am I supposed to find the set of super key first? 回答1: We can first convert the relation R to 3NF and then to BCNF. To convert a relation R and a set of functional dependencies( FD's ) into 3NF you can use Bernstein's Synthesis . To apply Bernstein's Synthesis - First we make sure the given set of FD's is a minimal cover Second we take each FD and make it its own sub-schema. Third we try