3

In relational database design, For example, there is schema S(banker, bname, customer) and function dependencies (FDs)

banker->bname customer,bname->banker

Is schema S in BCNF? Or it should be: (banker, bname) and (customer, banker)

NaMarPi
  • 164
  • 11
Alfred Zhong
  • 6,773
  • 11
  • 47
  • 59

2 Answers2

2

I don't think 'S' is in BCNF. Here's Chris Date's informal definition of BCNF.

A relvar is in BCNF if and only if the only determinants are candidate keys. (An Introduction to Database Systems, 7th ed, p 367)

The term determinant means the left-hand side of a functional dependency. If there's a functional dependency whose left-hand side isn't a candidate key, then the relation isn't in BCNF.

Let's rewrite your example in traditional notation.

R{ABC}
A->B
BC->A

There are two candidate keys: AC and BC. The left-hand side of A->B isn't a candidate key. So R isn't in BCNF.

Or it should be: (banker, bname) and (customer, banker)

No. Your functional dependencies say quite clearly that customer does not determine banker.

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185
0

I think it should be (banker, bname) and (customer, banker). Looks more like a foreign key relationship to me.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • I think so as well, so BCNF can break 1 FD into more tables, but not more than 1FD in 1 table, right? – Alfred Zhong Nov 05 '12 at 23:43
  • Yes, FDs can indeed become inexpressible as a consequence of splitting relation schemas. The phenomenon is called "dependency preservation". In logical database design, the FD needs to be reinstated ("replaced") by a logical database constraint. – Erwin Smout Nov 06 '12 at 22:59