
4 PUZZLE 2 ABSENTEES
PUZZLE
2
ABSENTEES
This problem was presented on the MS ACCESS forum on CompuServe
by Jim Chupella. He wanted to create a database that tracks employee
absentee rates. Here is the table you will use:
CREATE TABLE Absenteeism
(emp_id INTEGER NOT NULL REFERENCES Personnel (emp_id),
absent_date DATE NOT NULL,
reason_code CHAR (40) NOT NULL REFERENCES ExcuseList
(reason_code),
severity_points INTEGER NOT NULL CHECK (severity_points
BETWEEN 1 AND 4),
PRIMARY KEY (emp_id, absent_date));
An employee ID number identifies each employee. The reason_code
is a short text explanation for the absence (for example, “hit by beer
truck,” ...