First, we must find the entities.
Which "things" are important enough for us to uniquely identify them
with a number ?
- department
- faculty
- course
- semester
- section
- student
OK, let's highlight the entities in the description:
- The Emory College consists of a number of Departments
(MathCS, Physics, etc)
- A department
has a unique name, address, phone number
and can have a number of faculty members.
- A faculty
member has SSN, name, office, phone number and salary
- A department has one department chair with a starting date
- A department can teach a number of courses
- A course
has a unique ID, a course name and a description
- A semester
has an unique ID a start date and an end date.
- A number of sections
of a course is offered in a semester and
a section will be taught by one faculty member.
- Each section
is uniquely identified by a section number.
- Not every course will be offered in a semester and
some courses may have multiple offerings (multiple sections of
the course).
- A student
has an ID, name and address
- A student can enrolled in one section of some course.
- A student can enrolled in multiple sections
in one semester.
(Clarification: multiple sections of different courses
- but you don't have to represent this fact in the ER diagram
because it is not easy to do)
The next thing you do is find the
attributes for
each entity.
Attributes are properties that belong to a single entity -
if you find a property
that involves 2 (or more) entities,
that property is not an
attribute, but
a relationship.
From the descriptions, we can gather the following
attributes for the
entities:
- From line 2: department has a unique name, address, phone number
- Department(dName, address, phone)
- From line 3:
faculty member has SSN, name, office, phone number and salary
- Faculty(SSN, name, office, phone, salary)
- From line 6: course has a unique ID, a course name and a description
- Course(CourseID, cname, description)
- From line 7: semester has an ID, a start date and an end date.
- Semester(SemID, start_data, end_date)
- From the hint that section is very important for a university
(see above for reason...)
We just give section a key for now (and identify the attributes later):
sectionID
- From line 10: Student has an ID, name and address
- Student(StudID, name, address)
Next, find the properties
that involves
2 or more entities.
These are relationships.
You must also find the properties
of the relationship.
From the descriptions, we can gather the following
relationships
and their properties:
- Line 2:
department
has
faculty members:
- Relationship: Member(Department, Faculty)
- Relationship property:
- 1 department has N faculty,
- 1 faculty belongs to 1 department,
- department can have 0 faculty member
- but, a faculty member must belong to some department
- Line 4:
department
has a department
chair (faculty):
- Relationship: Chair(Department, Faculty)
- Relationship property:
- 1 department has 1 chair faculty,
- 1 faculty chairs 1 department,
- every department must have a chair
(this may sound contradicting
with the fact that a department can have 0 faculty members....
it need not, because empty departments can
have some faculty from another department as chair)
- not every faculty member is a chair
- Line 5:
department
offers
courses:
- Relationship: Catalog(Department, Course)
- Relationship property:
- 1 department offers N courses,
- 1 course is offered by 1 department,
- a department need not offer any course,
- a course must be offered by some department
- Line 8: a
course
is offered as a
section:
- Relationship: Offer(Section, Course)
- Relationship property:
- 1 course can be offered in N different sections,
- 1 section can offer exactly 1 course,
- not every course will be offered as sections,
- a section must offer some course
- Line 8:
a section
is offered in a
semester:
- Relationship: Offered_In(Section, Semester)
- Relationship property: 1 section can be offered in 1 semester,
- 1 semester can offer N sections,
- 1 section is offered in 1 semester,
- not every semester will offer section
(If you have a total participation for semester, it's OK and no point
will be deducted, in your model, you would
require that at least 1 section be offered in every semester...)
- a section must be offered in some semester (no choice here)
- Line 8: a
section is
taught by a
faculty:
- Relationship: Teaches(Section, Faculty)
- Relationship property:
- 1 section is taught by 1 faculty (no shared teaching),
- 1 faculty can teach N sections,
- a section must be taught by some faculty,
- not all faculty has to teach some section
(e.g., faculty can be on leave)
- Line 11: a
student
enrolls in a
section, and
Line 12: A
student can
enrolled in
multiple sections in one semester.
- Relationship: Takes(Student, Section)
- Relationship property:
- 1 student can enroll in N sections,
- 1 section can have N students enrolled,
- a student need not enroll in any section (you just have to
register to be a students, don't need to take any course -
this can happen when you just "wait" for graduation),
- a section can have no students enrolled
(e.g., before the enrollment period. BTW, sections
without any students enrolled will be cancelled.
But before cancellation, the section exists in the DB
without participating in the Takes relationship !!!)
Note:
- "A student can enrolled in multiple sections
in one semester"
does not mean
that there is a relationship between
student, section and
semester !!!
- Previously, you know that:
- A section is
offered in a
semester
|
The sentence:
- "A student can enrolled in multiple sections
in one semester"
|
is repeating the
information that:
- A section is
offered in a
semester
|
This sentence is actually saying that:
- "A student can enrolled in multiple
sections
that are offered in
a semester"
|
|