In: Computer Science
Employee ID |
First Name |
Last Name |
|
Title |
Address |
Extension |
Department |
Department ID |
Hiring Date |
Department Phone # |
0001 |
John |
Smith |
jsmith |
Accountant |
1300 West st |
5775 |
Accounting |
2100 |
8/1998 |
407-366-5700 |
0002 |
Brian |
Miller |
badams |
Admin Assistant |
1552 Palm dr |
5367 |
Human resource |
2300 |
4/1995 |
407-366-5300 |
0003 |
James |
Miller |
miller |
Inventory Manager |
2713 Buck rd |
5432 |
Production |
2520 |
8/1998 |
407-366-5400 |
0004 |
John |
Jackson |
jackson_sam |
Sales Person |
433 tree dr |
5568 |
Sales |
2102 |
6/1997 |
407-366-5500 |
0005 |
Robert |
Davis |
Davis |
Manager |
713 corner st |
5642 |
Production |
2520 |
1/2001 |
407-366-5400 |
0006 |
Paul |
Thompson |
thompsonp |
Market Analyst |
205 Bridge dr |
5744 |
Marketing |
2101 |
5/2003 |
407-366-5600 |
0007 |
Sandy |
Davis |
SDavis |
Manager |
713 Corner st |
5702 |
Accounting |
2100 |
11/1999 |
407-366-5700 |
1. List the major entities identified in the table above
2. After examining the table carefully identify candidate keys. Remember from the lecture that a candidate key field has to be unique, but should not hold private information that might compromise person's identity. For example SSN is unique and can be used to determine student information, so it is a candidate key, but using SSN might compromise student security for that it will not be used as primary key. The combination of first name and last name is not unique and cannot be used as a candidate key. Once the candidate keys been identified, some will be as primary keys and will be used to normalize the table. To connect the tables, the primary key of one table can be used as a foreign key in the other.
=== (1) ===
Entities in the relation:
- Employee ID
- First Name
- Last Name
- email
- Title
- Address
- Extension
- Department
- Department ID
- Hiring Date
- Department Phone #
=== (2) ===
Candidate keys:
- Employee ID
- email
- Extension
- First Name, Last Name
- First Name, Title
- First Name, Address
- First Name, Department
- First Name, Department ID
- First Name, Hiring Date
- First Name, Department Phone #
- Last Name, Department
- Last Name, Department ID
- Last Name, Hiring date
- Last Name, Department Phone #
- Title, Department
- Address, Department
- Title, Hiring Date
- Address, Hiring Date
- Department, Hiring Date
- Department ID, Hiring Date
- Hiring Date, Department Phone #
- Address, Department Phone #
- Title, Department Phone #
Note:
- for the given data values, the first name and last name together forms a unique identifier, unlike the given explanation in the question. Any subsequent modification in the dadta should also be changed in the solution.
- Candidate keys represent the minimum combination of entities that can uniquely identify a tuple in the given relational data.