Exercise 1

In this exercise, you will design the ER diagram for the UNIVERSITY database.

We'll cover the following

The university database

The university database stores details about university students, courses, the semester a student took a particular course (and his mark and grade if he completed it), and what degree program each student is enrolled in. The database is a long way from one that would be suitable for a large tertiary institution, but it does illustrate relationships that are interesting to visualize.

Consider the following requirements list:

Entities:

  • STUDENT entity.

  • PROGRAM entity.

  • COURSE entity.

Attributes:

  • Students have one or more given names, a surname, a student identifier, a date of birth, and the year they first enrolled. We can treat all given names as a single object—for example, “John Paul”

  • A program has a name, a program identifier, the total credit points required to graduate, and the year it commenced.

  • A course has a name, a course identifier, a credit point value, a year (for example, year 1), and a semester (for example, semester 1).

Relationships:

  • The university offers one or more programs.

  • A program is made up of one or more courses.

  • A student must enroll in a program.

  • A student takes the courses that are part of his/her program.

  • When a student takes a course, the year and semester he/she attempted it are recorded. When he/she finishes the course, a grade (such as A or B) and a mark (such as 60 percent) are recorded.

Try to design the ER diagram on your own. Give it some time and if you have trouble remembering some of the concepts, feel free to take a look at the previous lessons.


In the next lesson, we will discuss the solution to this problem.

Get hands-on with 1200+ tech skills courses.