In this example, I want to take the college student design
from a different perspective. In doing
this I want you to prepare an Entity-Relationship diagram with attributes and I
want you to also list the tables you design with primary keys and foreign keys
specified.
Here is the information you need to keep track of. You
should add other information that is needed to establish the relationships
between the entities or tables.
- Instructor:
id, name, office, phone, code for fill-time or part-time, title
- Dept:
deptcode, name, chair
- Student:
id, name, department (which for our purposes means major)
- Course:
courseid, name, credits
- Section:
sectionid, semester, year, max students
- An
instructor can teach for only one department and a department will have
one or more instructors – I need to show and establish the relationship
between instructor and department
- A
department is chaired by an instructor within the department
- A
student belongs to a department (for our purposes a major)
- A
course is offered by one department, a department offers many courses.
- A
section is a section of a course, a course has many sections
- An
instructor teaches a section and a section is taught by an instructor.