Está en la página 1de 5

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 universitys 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 ADMINISTRATOR PK ADMIN_NUM ADMIN_LNAME ADMIN_FNAME ADMIN_INITIAL ADMIN_E_MAIL ADMIN_JOB_CODE ADMIN_POS_TITLE SCHOOL PK FK1 FK1 SCHOOL_CODE SCHOOL_NAME PROF_NUM EMP_NUM PK,FK1 STAFF EMP_NUM STAFF_LNAME STAFF_FNAME STAFF_INITIAL STAFF_E_MAIL STAFF_JOB_CODE

is dean of operates

d O
employs
PK DEPARTMENT DEPT_CODE LEVEL I DEPT_NAME SCHOOL_CODE PROF_NUM EMP_NUM LEVEL II PK PK EMP_NUM STAFF_NUM PK PK EMP_NUM STAFF_NUM

STUDENT PK FK1 STU_NUM DEPT_CODE STU_LNAME STU_FNAME STU_INITIAL STU_EMAIL PROF_NUM EMP_NUM

has

FK1 FK2 FK2 PROFESSOR PK,FK2 PK EMP_NUM PROF_NUM DEPT_CODE PROF_SPECIALTY PROF_RANK PROF_LNAME PROF_FNAME PROF_INITIAL PROF_EMAIL

advises teaches

FK2 FK2

chairs

BUILDING PK BLDG_CODE BLDG_NAME BLDG_LOCATION ROOM PK,FK1 PK BLDG_CODE ROOM_CODE ROOM_TYPE

FK1

is written in
CLASS PK,FK3 PK CRS_CODE CLASS_CODE CLASS_SECTION CLASS_TIME PROF_NUM ROOM_CODE BLDG_CODE EMP_NUM

contains

is used for
offers

ENROLL PK,FK2 PK,FK2 PK,FK1 CRS_CODE CLASS_CODE STU_NUM ENROLL_DATE ENROLL_GRADE

COURSE PK FK1 CRS_CODE DEPT_CODE CRS_TITLE CRS_DESCRIPTION CRS_CREDITS

is found in

FK1 FK2 FK2 FK1

generates

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 EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_E_MAIL JOB_CODE EMP_SALARY PK COLLEGE COLLEGE_ID COLLEGE_NAME EMP_NUM DATE_ASSIGN DATE_TERM

manages
FK1

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

EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_E_MAIL DEPT_ID JOB_CODE DATE_ASSIGN EMP_SALARY

ACADEMIC PROG1 PK,FK1 EMP_NUM

TECH INF1 PK,FK1 EMP_NUM FK1

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.

También podría gustarte