Consider the EMPLOYEE entity type given below.
a. List all key and non-key attributes.
b. What is (are) the unique identifier(s)?
c. Which attribute(s) is (are) derived attributes?
d. Using the figure in Exercise 9 as a guide, develop sample data for four employees that illustrate the nature of the various mandatory and optional attributes in the EMPLOYEE entity. Be sure to illustrate the various ways the Name attribute might appear.
a. Key attributes – Fname, Minit, Lname, Name_tag. The attributes Fname, Minit, Lname, and Name_tag are key attributes because they are constituent parts of the composite identifier Name. Non-key attributes – Address, Salary, Gender, Date_hired, No_of_dependents; these five simple attributes have nothing to do with an identifier.
b. Emp# and Name; in other words, we have a unique identifier that is a simple (atomic) attribute and another that is a composite attribute.
c. No_of_dependents. Note: We have seen students indicate that a person’s name as a combination of his or her first name, middle initial, last name, and name tag, constitutes a derived attribute. While perhaps a reasonable thing to do, this is not correct.
Note how this example shows how the Name attribute might appear in four different ways: one time with just the first name and last name; one time with the first name, middle initial, last name; a third time with a first name, last name, and name tag; and a fourth time with a first name, middle initial, last name, and name tag. Since the first name and last name are required attributes, they appear for each employee. Middle initial appears twice: once with a name tag and once without a name tag. Likewise, middle initial does not appear two times, once with a name tag and once without a name tag.