CS631 Final Exam Fall 2020
Notes:
1. There are NINE problems in this assignment.
2. All answers should be explained even when explanation not
... [Show More] requested.
3. Please clearly list any assumptions that you wish to make.
4. Do not assume that a table will have no records added to it in the future (closed) unless the
problem states this.
5. For all problems with Primary Key (PK) analysis, remember to think minimal.
6. The Company database we have used all semester is attached at the end of the assignment.
7. Notation: ABYZ means that A and B (together not individually) functionally determine Y and
that A and B (together not individually) functionally determine Z.
Problem 1 (8 points)
Explain why all keys are superkeys but not all superkeys are keys. Define the terms key and super key.
Answer 1
Key: It is the minimum number of attributes that can uniquely identity a tuple in a relation is called a key.
Super key: Any set of attributes that can uniquely identity a tuple in a relation is called super key.
Since a key can uniquely identity a tuple in a relation it can be classified as a super key. But out of the
many sets that can be a superkey in a relation, only one set of attributes is the simplest way of
identifying the tuple on a table making it impossible for all superkeys of a table to be a key of a table.
1
CS631 Final Exam Fall 2020
Problem 2 (10 points)
Bruce Forman’s Internet Addiction Program (BFIAP) was terminated in 2015 when Bruce finally
confessed to his Internet addiction. But Bruce is still tracking all of the program member’s through a
database table called ProgMems. Since there were no members with duplicate last names, Bruce
decided that he would use the LastName field as the primary key. Since the program was terminated
there will never be a new record added to the table ProgMems. The table below shows the attributes in
the BFIAP database.
Squarepants Consulting Inc. (SCI) has picked up the administration of the database. The database team is
meeting to discuss this database specifically. Chief DBA, SpongeBob questioned the use of the last name
as the Primary Key, stating that last name is generally not unique.
Squidward pointed out that even though that was generally true, the following points should be
considered:
1. Since there are no duplicate last names, it was not a problem when the table was designed, and
has not been a problem since.
2. There will never be a new record added to this table.
3. It is illegal to use Social Security Number as a PK. [Show Less]