A Sample UNIVERSITY EER Schema, Design Choices, and Formal Definitions
For our sample database application, consider a UNIVERSITY database that keeps track of students and their majors, transcripts, and registration as well as of the university’s course offerings. The database also keeps track of the sponsored research projects of faculty and graduate students. This schema is shown in Figure 8.9. A discussion of the requirements that led to this schema follows.
For each person, the database maintains information on the person’s Name [Name],Social Security number [Ssn], address [Address], sex [Sex], and birth date [Bdate].Two subclasses of the PERSON entity type are identified: FACULTY and STUDENT.Specific attributes of FACULTY are rank [Rank] (assistant, associate, adjunct,research, visiting, and so on), office [Foffice], office phone [Fphone], and salary[Salary]. All faculty members are related to the academic department(s) with which they are affiliated [BELONGS] (a faculty member can be associated with several departments, so the relationship is M:N). A specific attribute of STUDENT is [Class] (freshman=1, sophomore=2, ..., graduate student=5). Each STUDENT is also related to his or her major and minor departments (if known) [MAJOR] and [MINOR], to the course sections he or she is currently attending [REGISTERED], and to the courses completed [TRANSCRIPT].
Each TRANSCRIPT instance includes the grade the student received [Grade] in a section of a course. GRAD_STUDENT is a subclass of STUDENT, with the defining predicate Class = 5. For each graduate student, we keep a list of previous degrees in a composite, multivalued attribute [Degrees].We also relate the graduate student to a faculty advisor [ADVISOR] and to a thesis committee [COMMITTEE], if one exists.
An academic department has the attributes name [Dname], telephone [Dphone], and office number [Office] and is related to the faculty member who is its chairperson [CHAIRS] and to the college to which it belongs [CD].