This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Sample Database A relatively simple database will be used for the SQL, ASP and PHP examples in our lectures this semester. The database will keep track of employees (past and present), their family members and their paychecks. The commands to create and populate the sample database are available here . Employee Table The employee table has personal information (e.g., name, gender, address) and professional information (e.g., job title, annual salary, supervisor) for current as well as former employees. Employees can be uniquely identified by their EID or their SSN. EID was chosen to be the primary key of the table, thus ensuring its uniqueness. The uniqueness of the SSN, on the other hand, will be ensured by a secondary index. The Active field indicates whether the person is a current employee ('Y') or a former employee ('N'). The Supervisor field identifies the EID of each employee's immediate supervisor (i.e., corporate parent). The Supervisor field serves as a foreign key of a unary relationship. Former employees do not have supervisors Supervisor field serves as a foreign key of a unary relationship....
View Full Document
- Spring '08