Questions: Functional Dependencies

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A database table currently has the property that every row with ZipCode = '90210' also has City = 'Beverly Hills.' What can you conclude about the functional dependency ZipCode → City?

AZipCode → City holds — the data proves it
BZipCode → City may or may not hold — the current data is consistent with it, but an FD must hold for all possible future data
CZipCode → City definitely holds, because zip codes and cities have a one-to-one relationship
DZipCode → City holds only if ZipCode is the primary key
Question 2 Multiple Choice

In a student table, the FD StudentID → Name holds. A data-entry error creates two rows with the same StudentID but different Names. What is true?

AThe FD no longer holds — functional dependencies can change as data changes
BThe FD is violated — the data is inconsistent with the declared constraint
CThe FD still holds for all other rows, so the table is partially valid
DThis situation is impossible if StudentID is a primary key, so no FD is violated
Question 3 True / False

A functional dependency X → Y means that knowing X causes Y to take a particular value in some physical or logical sense.

TTrue
FFalse
Question 4 True / False

A candidate key is a minimal superkey: it determines all attributes of the relation, and no proper subset of it also determines all attributes.

TTrue
FFalse
Question 5 Short Answer

Why does the distinction between 'an FD appearing to hold in current data' versus 'an FD declared as a design constraint' matter for database design?

Think about your answer, then reveal below.