Susan Portugal Comp520 Advanced Databases February 23, 2009 Assignment 3 Chapter 6 Problems 4, 5, and 6 Problem 6.4 In Chapter 4, you saw the creation of the Tiny College database design. That design reflected such business rules as “a professor may advise many students” and “a professor may chair one department.” Modify the design shown in Figure 4.36 to include these business rules: • An employee could be staff or a professor or an administrator. • A professor may also be an administrator. • Staff employees have a work level classification, such a Level I and Level II. • Only professors can chair a department. A department is chaired by only on professor. • Only professors can serve as the dean of a college. Each of the university’s colleges is served by one dean. • A professor can each many classes. • Administrators have a position title. Given that information, create the ERD containing all primary keys, foreign keys, and main attributes. Figure 4.36 The completed Tiny College ERD The following ERD diagram modifies Figure 4.36 with the addition of the business rules outlined. The figure includes primary keys, foreign keys, and main attributes. EMPLOYEE PK EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_E_MAIL JOB_CODE EMP_SALARY DEPT_CODE SCHOOL ADMINISTRATOR PK PK SCHOOL_CODE FK1 FK1 SCHOOL_NAME PROF_NUM EMP_NUM STAFF PK,FK1 STAFF_LNAME STAFF_FNAME STAFF_INITIAL STAFF_E_MAIL STAFF_JOB_CODE is dean of ADMIN_NUM operates ADMIN_LNAME ADMIN_FNAME ADMIN_INITIAL ADMIN_E_MAIL ADMIN_JOB_CODE ADMIN_POS_TITLE d O employs DEPARTMENT PK DEPT_CODE FK1 FK2 FK2 DEPT_NAME SCHOOL_CODE PROF_NUM EMP_NUM STUDENT PK STU_NUM FK1 DEPT_CODE STU_LNAME STU_FNAME STU_INITIAL STU_EMAIL PROF_NUM EMP_NUM FK2 FK2 LEVEL I has advises teaches CLASS ENROLL CRS_CODE CLASS_CODE STU_NUM ENROLL_DATE ENROLL_GRADE PK PK LEVEL II EMP_NUM STAFF_NUM PK PK EMP_NUM STAFF_NUM PROFESSOR is written in PK,FK2 PK,FK2 PK,FK1 EMP_NUM is found in PK,FK3 PK CRS_CODE CLASS_CODE FK1 FK2 FK2 FK1 CLASS_SECTION CLASS_TIME PROF_NUM ROOM_CODE BLDG_CODE EMP_NUM PK,FK2 PK EMP_NUM PROF_NUM FK1 DEPT_CODE PROF_SPECIALTY PROF_RANK PROF_LNAME PROF_FNAME PROF_INITIAL PROF_EMAIL BUILDING chairs PK BLDG_CODE BLDG_NAME BLDG_LOCATION ROOM PK,FK1 PK is used for contains BLDG_CODE ROOM_CODE ROOM_TYPE offers generates COURSE PK CRS_CODE FK1 DEPT_CODE CRS_TITLE CRS_DESCRIPTION CRS_CREDITS Susan Portugal Comp520 Advanced Databases February 23, 2009 Assignment 3 Chapter 6 Problems 4, 5, and 6 Problem 6.5 Tiny College wants to keep track of the history of all administrative appointments (date of appointment and date of termination). (Hint: Time variant data are at work.) The Tiny College chancellor may want to know how many deans worked in the College of Business between January 1, 1960 and January 1, 2008 or who the dean of the College of Education was in 1990. Give that information, create the complete ERD containing all primary keys, foreign keys, and main attributes. The following figure includes primary keys, foreign keys, and main attributes. Current Data EMPLOYEE PK COLLEGE EMP_NUM PK manages EMP_LNAME EMP_FNAME EMP_INITIAL EMP_E_MAIL JOB_CODE EMP_SALARY FK1 COLLEGE_ID COLLEGE_NAME EMP_NUM DATE_ASSIGN DATE_TERM Historic Data EMP_MGR_HIST COLLEGE_MGR_HIST ADMIN_HIST PK,FK1 PK,FK2 PK PK EMP_NUM DEPT_ID DATE_ASSIGN DATE_TERM Susan Portugal Comp520 Advanced Databases February 23, 2009 Assignment 3 Chapter 6 Problems 4, 5, and 6 Problem 6.6 Some Tiny staff employees are information technology (IT) personnel. Some IT personnel provide technology support for academic programs. Some IT personnel provide technology infrastructure support. Some IT personnel provide technology support for academic programs and technology infrastructure support. IT personnel are not professors. IT personnel are required to take periodic training to retain their technical expertise. Tiny College tracks all IT personnel training by date, type, and results (completed vs. not completed). Given that information, create the complete ERD containing all primary keys, foreign keys, and main attributes. The following figure includes primary keys, foreign keys, and main attributes. The following ERD depicts the IT Department pertaining to the IT Employees. Current Data IT EMPLOYEE1 PK O ACADEMIC PROG1 PK,FK1 EMP_NUM TECH INF1 PK,FK1 EMP_NUM FK1 EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_E_MAIL DEPT_ID JOB_CODE DATE_ASSIGN EMP_SALARY IT DEPARTMENT1 employs PK DEPT_ID DEPT_NAME DATE_ASSIGN EMP_TRAIN_HIST Historic Data TRAINING_HIST1 PK,FK1 PK,FK2 PK EMP_NUM DEPT_ID DATE_ASSIGN JOB_CODE EMP_SALARY TRAIN_DATE TRAIN_TYPE TRAIN_RESULTS DEPT_TRAIN_HIST Susan Portugal Comp520 Advanced Databases February 23, 2009 Assignment 3 Chapter 6 Problems 4, 5, and 6 Reference: Peter Rob and Carlos Coronel. Database Systems : Design, Implementation, and Management. Boston: Course Technology, 2007.