0% found this document useful (0 votes)
84 views6 pages

ERD_UNIVERSITY_UNIT2

Erd and all information of rdbms

Uploaded by

yoyo36685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views6 pages

ERD_UNIVERSITY_UNIT2

Erd and all information of rdbms

Uploaded by

yoyo36685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Draw an ER diagram for a University

database application(DBMS)?

Reference Link:

https://www.tutorialspoint.com/draw-an-er-diagram-for-a-university-database-application-dbms

Problem

Drawing of ER model of university database application considering the constraints −

 A university has many departments.


 Each department has multiple instructors (one person is HOD). Here the HOD refers
to the head of department.
 An instructor belongs to only one department.
 Each department offers multiple courses, each subject is taught by a single instructor.
 A student may enroll for many courses offered by different departments.

Solution

Follow the steps given below to draw an Entity Relationship (ER) diagram for a University
database application −

Step 1 − Identifying the entity sets.

The entity set has multiple instances in a given business scenario.

As per the given constraints the entity sets are as follows −

 Department
 Course
 Student
 Instructor

Head of the Department (HOD) is not an entity set. It is a relationship between the instructor
and department entities.

Step 2 − Identifying the attributes for the given entities

 Department − the relevant attributes are department Name and location.


 Course − The relevant attributes are courseNo, course Name, Duration, and
prerequisite.
 Instructor − The relevant attributes are Instructor Name, Room No, and telephone
number.
 Student − The relevant attributes are Student No, Student Name, and date of birth.

1
Step 3 − Identifying the Key attributes

 Department Name is the key attribute for Department.


 CourseNo is the key attribute for Course entity.
 Instructor Name is the key attribute for the Instructor entity.
 StudentNo is the key attribute for Student entities.

Step 4 − Identifying the relationship between entity sets

 The department offers multiple courses and each course belongs to only one
department, hence cardinality between department and course if one to many.

 One course is enrolled by multiple students and one student for multiple courses.
Hence, relationships are many to many.

 One department has multiple instructors and one instructor belongs to one and only
one department, hence the relationship is one to many.

 Each department has one “HOD” and one instructor is “HOD” for only one
department, hence the relationship is one to one. Here, HOD refers to the head of the
department.

2
 One course is taught by only one instructor but one instructor teaches many courses
hence the relationship between course and instructor is many to one.

The relationship between instructor and student is not defined because of the following
reasons −

 There is no significance in the relationship.


 We can always derive this relationship indirectly through course and instructors, and
course and student.

Step 5 − Complete ER model

The complete ER Model is as follows −

3
OR

Reference Link:

4
https://www.thetechplatform.com/post/er-diagram-example-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’d be suitable for a large tertiary institution, but it
does illustrate relationships that are interesting to query, and it’s easy to relate to when you’re
learning SQL.

Consider the following requirements list:

 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 her program.
 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, and the year it
commenced.
 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.”
 When a student takes a course, the year and semester he attempted it are recorded.
When he finishes the course, a grade (such as A or B) and a mark (such as 60 percent)
are recorded.
 Each course in a program is sequenced into a year (for example, year 1) and a
semester (for example, semester 1).

The ER diagram derived from our requirements is shown in Figure .

Although it is compact, the diagram uses some advanced features, including relationships that
have attributes and two many-to-many relationships.

5
6

You might also like