Exercise
Answers for this exercise may vary because of different interpretations.
Some possible FDs:
Social Security number à name
Area code à state
Street address, city, state à zipcode
Possible keys:
{Social Security number, street address, city, state, area code, phone number}
Need street address, city, state to uniquely determine location. A person could have multiple addresses. The same is true for phones. These days, a person could have a landline and a cellular phone
Exercise
Answers for this exercise may vary because of different interpretations
Some possible FDs:
ID à x-position, y-position, z-position
ID à x-velocity, y-velocity, z-velocity
x-position, y-position, z-position à ID
Possible keys:
{ID}
{x-position, y-position, z-position}
The reason why the positions would be a key is no two molecules can occupy the same point.
Exercise
The superkeys are any subset that contains A1. Thus, there are 2(n-1) such subsets, since each of the n-1 attributes A2 through An may independently be chosen in or out.
Exercise
The superkeys are any subset that contains A1 or A2. There are 2(n-1) such subsets when considering A1 and the n-1 attributes A2 through An. There are 2(n-2) such subsets when considering A2 and the n-2 attributes A3 through An. We do not count A1 in these subsets because they are already counted in the first group of subsets. The total number of subsets is 2(n-1) + 2(n-2).
Exercise
The superkeys are any subset that contains {A1,A2} or {A3,A4}. There are 2(n-2) such subsets when considering {A1,A2} and the n-2 attributes A3 through An. There are 2(n-2) – 2(n-4) such subsets when considering {A3,A4} and attributes A5 through An along with the individual attributes A1 and A2. We get the 2(n-4) term because we have to discard the subsets that contain the key {A1,A2} to avoid double counting. The total number of subsets is 2(n-2) + 2(n-2) – 2(n-4).
Exercise
The superkeys are any su
数据库系统基础教程第三章答案解析 来自淘豆网www.taodocs.com转载请标明出处.