1

Let's say we have the following functional dependencies:

A->B, B->C, C->B, and A->C

Where the functional dependency A->C is explicit, i.e. you don't have to go through B to get to C from A.

Is there a transitive dependency between A and C? If I was wanting to use this to build my relation and have the relation satisfy third normal form, would I have to break it up into two relations?:

A* B
B* C

(where * means primary key, and each line is the header of a relation)

Or would keeping it as:

A* B C

still satisfy 3NF?

Explicitly my question is given the functional dependencies: A->B, B->C, C->B, and A->C Is A->C a transitive dependency and why/why not?

thed0ctor
  • 1,350
  • 4
  • 17
  • 34

2 Answers2

0

A->C is not a transitive dependency. A->B->C is a transitive dependency.

The term "transitive" just means the dependency has more than one part to it. Note that a relation may satisfy 3NF while still having transitive dependencies. In this case however, to satisfy 3NF you need to decompose A,B,C into at least two relations with A,B and C all being candidate keys.

nvogel
  • 24,981
  • 1
  • 44
  • 82
  • I thought that 3NF means you don't have transitive dependencies. – thed0ctor Oct 06 '13 at 18:35
  • 1
    Unfortunately 3NF is often explained in terms of transitive dependencies, which perhaps makes it harder to understand than it needs to be. IMO Carlo Zaniolo's explanation of 3NF is clearer and more satisfactory (although it's exactly equivalent to Codd's). A relation R is 3NF iff for every nontrivial FD of R, X -> A, (a) X is a superkey for R, or (b) A is a key attribute for R. – nvogel Oct 06 '13 at 19:57
  • A->C is a transitive FD. "A->B->C" is not a FD; so it makes no sense to say it's transitive. "dependency has more than one part to it" is not clear. (I guess it's trying to say something about things like "A->B->C" having "parts" A->B & B->C.) X->Y is transitive when/iff there exists S where X->S & S-> Y & not S->X & (sets) X, S & Y are different. Assuming A, B & C are attributes & assuming the given FDs form a cover, so that applying Armstrong's axioms we have not B->A, we have A->B & B->C & not B->A & {A}, {B} & {C} are different so A->C is transitive. – philipxy Jan 27 '21 at 21:30
0

If this is a complete list of dependencies, then there is a transitive dependency A -> B -> C, because:

  • A -> B
  • not B -> A
  • B -> C

(If this is not a complete list of dependencies, then we don't know whether there might be B -> A or not, and therefore we don't know whether that transitive dependency holds.)

There is also a transitive dependency A -> C -> B.

Is A->C a transitive dependency and why/why not?

A transitive dependency is between 3 attributes, so no.


To normalize the relation to the 3NF, you'll need to split it to 2 relations...

  • A* B
  • B* C*

...or...

  • A* C
  • B* C*

...where * denotes a key (primary or alternate).

Branko Dimitrijevic
  • 50,809
  • 10
  • 93
  • 167