(min, max) constraints on this diagram. State clearly any additional assumptions you
make. If we add the relationship ADOPTS between INSTRUCTOR and TEXT, what (min,
max) constraints would you put on it? Why?
Answer:
Assuming the following additional assumptions:
- Each course is taught by exactly one instructor.
- Each textbook is used by one and only one course.
- An instructor does not have to adopt a textbook for all courses.
- If a text exists:
- ___it is used in some course,
- ___hence it is adopted by some instructor who teaches that course.
- An instructor is considered to adopt a text if it is used in some course taught
- by that instructor.
The resulting ER Diagram will have the (min, max) constraints shown in Figure B.
3.26 Consider an entity type
SECTION
in a
UNIVERSITY
database, which describes the
section offerings of courses. The attributes of
SECTION
are SectionNumber, Semester,
Year, CourseNumber, Instructor, RoomNo (where section is taught), Building (where
section is taught), Weekdays (domain is the possible combinations of weekdays in which
a section can be offered {MWF, MW, TT, etc.}). Assume tat SectionNumber is unique for
each course within a particular semester/year combination (that is, if a course if offered
multiple times during a particular semester, its section offerings are numbered 1, 2, 3,
etc.). There are several composite keys for
SECTION
, and some attribute sare
components of more than one key. Identify three composite keys, and show how they
can be represented in an ER schema diagram.
9