这是数据库系统概念里的证明过程,建议楼主买本看看。 7.25是证明3nf的定义等价于R中没有非主属性传递依赖于主码 7.26是证明每个3nf都是2nf7.25 Answer: Suppose R is in 3NF according to the textbook definition. We show that it is in 3NF according to the definition in the exercise. Let A be a nonprime attribute in R that is transitively dependent on a key α for R. Then there exists β ⊆ R such that β → A, α → β, A ∈ α, A ∈ β, and β → α does not hold. But then β → A violates the textbook definition of 3NF since • A ∈ β implies β → A is nontrivial • Since β → α does not hold, β is not a superkey • A is not any candidate key, since A is nonprime Now we show that if R is in 3NF according to the exercise definition, it is in 3NF according to the textbook definition. Suppose R is not in 3NF according the the textbook definition. Then there is an FD α → β that fails all three conditions. Thus • α → β is nontrivial. • α is not a superkey for R. • Some A in β − α is not in any candidate key. This implies that A is nonprime and α → A. Let γ be a candidate key for R. Then γ → α, α → γ does not hold (since α is not a superkey), A ∈ α, and A ∈ γ (since A is nonprime). Thus A is transitively dependent on γ, violating the exercise definition. 7.26 Answer: Referring to the definitions in Exercise 7.25, a relation schema R is said to be in 3NF if there is no non-prime attribute A in R for which A is transitively dependent on a key for R. We can also rewrite the definition of 2NF given here as : “A relation schema R is in 2NF if no non-prime attributeA is partially dependent on any candidate key for R.” To prove that every 3NF schema is in 2NF, it suffices to show that if a nonprime attribute A is partially dependent on a candidate key α, then A is also transitively dependent on the key α. Let A be a non-prime attribute in R. Let α be a candidate key for R. Suppose A is partially dependent on α. • From the definition of a partial dependency, we know that for some proper subset β of α, β → A. • Since β ⊂ α, α → β. Also, β → α does not hold, since α is a candidate key. • Finally, since A is non-prime, it cannot be in either β or α. Thus we conclude that α → A is a transitive dependency. Hence we have proved that every 3NF schema is also in 2NF.
http://www.cs.xmu.edu.cn/education/fine_courses/database/%BE%AB%C6%B7%BF%CE%B3%CC%BD%A8%C9%E8%C4%DA%C8%DD/3_%CD%F8%C2%E7%B0%E6cai/content/5/5.2.5.htm
而且据我了解,大家也只是对SQL SERVER的使用透彻而已,这样理论的东西
我看没几个能弄出来。
7.25是证明3nf的定义等价于R中没有非主属性传递依赖于主码
7.26是证明每个3nf都是2nf7.25 Answer: Suppose R is in 3NF according to the textbook definition. We show
that it is in 3NF according to the definition in the exercise. Let A be a nonprime
attribute in R that is transitively dependent on a key α for R. Then there exists
β ⊆ R such that β → A, α → β, A ∈ α, A ∈ β, and β → α does not hold.
But then β → A violates the textbook definition of 3NF since
• A ∈ β implies β → A is nontrivial
• Since β → α does not hold, β is not a superkey
• A is not any candidate key, since A is nonprime
Now we show that if R is in 3NF according to the exercise definition, it is in 3NF
according to the textbook definition. Suppose R is not in 3NF according the the
textbook definition. Then there is an FD α → β that fails all three conditions.
Thus
• α → β is nontrivial.
• α is not a superkey for R.
• Some A in β − α is not in any candidate key.
This implies that A is nonprime and α → A. Let γ be a candidate key for R.
Then γ → α, α → γ does not hold (since α is not a superkey), A ∈ α, and
A ∈ γ (since A is nonprime). Thus A is transitively dependent on γ, violating
the exercise definition.
7.26 Answer: Referring to the definitions in Exercise 7.25, a relation schema R is said
to be in 3NF if there is no non-prime attribute A in R for which A is transitively
dependent on a key for R.
We can also rewrite the definition of 2NF given here as :
“A relation schema R is in 2NF if no non-prime attributeA is partially dependent
on any candidate key for R.”
To prove that every 3NF schema is in 2NF, it suffices to show that if a nonprime
attribute A is partially dependent on a candidate key α, then A is also
transitively dependent on the key α.
Let A be a non-prime attribute in R. Let α be a candidate key for R. Suppose
A is partially dependent on α.
• From the definition of a partial dependency, we know that for some proper
subset β of α, β → A.
• Since β ⊂ α, α → β. Also, β → α does not hold, since α is a candidate key.
• Finally, since A is non-prime, it cannot be in either β or α.
Thus we conclude that α → A is a transitive dependency. Hence we have proved
that every 3NF schema is also in 2NF.