Search code examples
relational-databaserelational-algebrafunctional-dependencies

How to determine candidate keys from record schema and functional dependencies?


If I have a schema say R={A,B,C,D} and functional dependencies say {B->C, D->A} will my set of candidate keys be {B,D} or {BD}?


Solution

  • If B were a candidate key, you'd have to be able to derive these functional dependencies from the ones given in the problem.

    • {B->A}
    • {B->C}
    • {B->D}

    Can you do that?