Search code examples
databasefunctional-dependencies

Find minimal candidate keys


I have 2 sets

R = {A B C D}
H = {AB-> C , AB-> D, D-> B}

Want to find all minimal keys in R set

My answer for minimal keys is : { A D }

this is because

AB -> C and AB -> D then AB -> CD
since D -> B then AD is the minimal keys

when i check my answer with this site. the site giving wrong answer. can explain?


Solution

  • The site says, "Set of found candidate-keys: {{A, C, F}, {B, C, F}}." That's clearly wrong; F isn't even in R.

    In any case, your answer is incomplete. AD is one of two candidate keys.