Re: rookie to gurus: transitive?
Date: 26 Feb 2001 10:57:25 GMT
Message-ID: <97dcql$ec2$1_at_news.tue.nl>
Arne Jonsson wrote:
>
> I´m trying to get hold of normalization forms. Anyone who can explain
> "transitive dependencies" at street level (with some real life
> examples)?
First let me say that I really dislike the term "transitive dependency". It is often used to make the explanation of 3NF easier but in reality makes things only harder to understand, especially if there is more than one (candidate) key. Even the term itself is crummy because it is not really the dependency that is transitive. So if you are confused about them, that's not your fault. :-)
Ok. Enough ranting, I'll get on with the explanation now. Suppose you have the relation
Order-line(order#, line#, article#, amount, article-price)
that stores the information of the lines of orders. (The information that goes with the order itself is stored in another table.) The primary key of this relation is going to be {order#, line#}.
The definition of a transitive dependency is as follows:
An FD X->Y is transitive if there is a set of attributes Z that is not a subset of the key such that X->Z and Z->Y.
To understand this look at the example relation I gave. The FD that satisfies the definition is:
FD1: order#, line# -> article-price
because we have also
FD2: order#, line# -> article#
FD3: article# -> article-price.
Note that when normalizing to 3NF we do not factor out the transitive dependency FD1 but the dependency that *makes* it a transitive dependency but does not follow from the key, which in this case is FD3.
Hope this helps.
-- Jan HiddersReceived on Mon Feb 26 2001 - 11:57:25 CET
