-2

If B is functionally dependent on A (A -> B) can A be functionally dependent on B (B -> A)? Why?

Example:

A table contains five columns: Patient Number, Full name, Bed number, Ward number and Ward name.

Is it possible to say that Ward Number -> Ward Name and Ward Name -> Ward Number?

From my understanding a functional dependency A -> B means that given a tuple containing A there will always be the same B, but not the other way around.

A Ward will always have the same number and name making the functional dependency go both ways.

Marcus
  • 289
  • 1
  • 3
  • 19
  • It's not clear what you're asking. *Can* A be "functionally dependent" on B? Sure. Does it *have* to be? No. – Dave Newton Apr 29 '19 at 13:39
  • So A can be functionally dependent on B while B is functionally dependent on A? – Marcus Apr 29 '19 at 13:41
  • "From my understanding" is not helpful. Also your "meaning" is so sloppy it is not useful. Go get a definition of "functionally dependent" from your textbook & quote it & show the steps of your work applying it. PS The last 2 paragraphs seem to contradict each other because "but not the other way around" seems to mean that the phrase you give with B & A swapped must not hold. But maybe you mean something like 'but the meaning doesn't include that other way around'--in which case just don't include that phrase when giving the meaning. Except don't use your version--find a definition. PS Yes. – philipxy Apr 29 '19 at 19:17

1 Answers1

2

If B is functionally dependent on A (A -> B) can A be functionally dependent on B (B -> A)?

Yes. Informally, it might help you to think about it this way.

Say a relation has two candidate keys, A and B. Since A is a candidate key, it determines all the other attributes. So A->B. And since B is a candidate key, it also determines all the other attributes. So B -> A.

For a real-world example, think about a table of chemical elements. (WARNING: I'm not a chemist.)

element_name  atomic_number  chem_symbol
--
Hydrogen      1              H
Helium        2              He
Lithium       3              Li
...

Each of these three columns is a candidate key. And element_name determines atomic_number and chem_symbol, atomic_number determines element_name, and chem_symbol, etc.

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