89% found this document useful (38 votes)
7K views15 pages

University Database ER Diagram Design

Here are the E-R diagrams for the given scenarios: [DIAGRAM 1] [DIAGRAM 2]

Uploaded by

sambashivarao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
89% found this document useful (38 votes)
7K views15 pages

University Database ER Diagram Design

Here are the E-R diagrams for the given scenarios: [DIAGRAM 1] [DIAGRAM 2]

Uploaded by

sambashivarao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Case Study - 1

Complete Example for E/R schema:


Specifications (1/3)
1. In an educational institute, there are several
departments and students belong to one of them.
Each department has a unique department number, a
name, a location, phone number and is headed by a
professor.
2. Professors have a unique employee Id, name, phone
number. We like to keep track of the following details
regarding students: name, unique roll number, sex,
phone number, date of birth, age and one or more
email addresses.
Complete Example for E/R schema:
Specifications (2/3)
3. Students have a local address consisting of the hostel
name and the room number. They also have home
address consisting of house number, street, city and
PIN. It is assumed that all students reside in the
hostels.
4. A course taught in a semester of the year is called a
section. There can be several sections of the same
course in a semester; these are identified by the
section number. Each section is taught by a different
professor and has its own timings and a room to meet.
Complete Example for E/R schema:
Specifications (3/3)
5. Students enroll for several sections in a semester. Each
course has a name, number of credits and the department
that offers it. A course may have other courses as pre-
requisites i.e, courses to be completed before it can be
enrolled in.
6. Professors also undertake research projects. These are
sponsored by funding agencies and have a specific start
date, end date and amount of money given. More than one
professor can be involved in a project. Also a professor
may be simultaneously working on several projects. A
project has a unique projectId.
Entities -Student
Entities –Department and Course
Entities –Professor, Project and
Sections
E/R Diagram showing relationships
Case Study - 2
Example COMPANY Database

• Requirements of the Company


(oversimplified for illustrative purposes)
– The company is organized into
DEPARTMENTs. Each department has a name,
number and an employee who manages the
department. We keep track of the start date of
the department manager.
– Each department controls a number of
PROJECTs. Each project has a name, number
and is located at a single location.
Example COMPANY Database (Cont.)

– We store each EMPLOYEE’s social security


number, address, salary, sex, and birthdate.
Each employee works for one department but
may work on several projects. We keep track of
the number of hours per week that an employee
currently works on each project. We also keep
track of the direct supervisor of each employee.
– Each employee may have a number of
DEPENDENTs. For each dependent, we keep
track of their name, sex, birthdate, and
relationship to employee.
An ER schema diagram for the COMPANY database.
Exercises
Exercise - 1
• A university registrar’s office maintains data about the following
entities:
– (a) Courses, including course number, title , credits,
syllabus, and prerequisites;
– (b) Course offerings, including course number, year,
semester, section number, instructor's, timings, and
classroom;
– (c) Students, including student-id, name, and program; and
– (d) Instructors, including identification number, name,
department, and title. Further, the enrollment of students in
courses and grades awarded to students in each course they
are enrolled for must be appropriately modeled.
Construct an E-R diagram for the registrar’s office. Document
all assumptions that you make about the mapping
constraints.
Exercise - 2

• Construct an E-R diagram for a car-insurance


company whose customers own one of more cars
each. Each car has associated with it zero to any
number of recorded accidents.
• Construct an E-R diagram for a hospital with a
set of patients and set of medical doctors.
Associate with each patient a log of the various
tests and examinations conducted.

u001fu0001u0002u0003u0004u0005u0006u0007bu0003
u001fu0001u0002u0003u0004u0005u0006u0007bu0003
pu0001u0002u0003u0004u0002u0003u0005u0006u0007bu0004	
u000bu0002u0004fu0003
u0002
	
	u0007	u0005u000eu0003	u000fu0005u0010u0005u0003u0004u0010u0005u0003
u0005u0011u0005u0010u0004fu0003
u0006u0005u0012u0004u0010	u0013u0005u0002	
u0003u0004u0002u0006u0003
	u0007u0006u0005u0002	
u0003u0014u0005fu000bu0002u0015u0003	u000bu0003u000bu0002u0005u0003u000bu0016u0003	u000fu0005u0013u0003
u0017u0004bu000fu0003u0006u0005u0012u0004u0010	u0013u0005u0002	u0003u000fu0004
u0003u0004u0003u0007u0002
u0018u0007u0005
=u0003!	u0007u0006u0005u0002	
u0003u000fu0004u0011u0005u0003u0004u0003fu000bbu0004fu0003u0004u0006u0006u0010u0005

u0003bu000bu0002

	
u0002u0015u0003u000bu0016u0003	u000fu0005u0003u000fu000b
	u0005fu0003
u0002u0004u0013u0005u0003u0004u0002u0006u0003	u000fu0005u0003u0010u000bu000bu0013u0003u0002u0007u0013u0014u0005u0010u0003"u000fu0005u0019u0003u0004f
u000bu0003u000fu0004u0011u0005u0003u000fu000bu0013u0005u0003
u0004u0006u0006u0010u0005

u0003bu000bu0002

	
u0002u0015u0003u000bu0016
u001fu000bf
u000eu0002u0005u0002u0003u000fu0010f
u000eu0002u0003u0011u000bu0012u0003u000fu0013u0014u0003u0001u0015u0016u0002fu0017u0003
u001fu000bf
u000eu0002u0005u0002u0003u000fu0010f
u000eu0002u0003u0011u000bu0012u0003u000fu0013u0014u0003u0001u0015u0016u0002fu0017u0003
u0004
u0002u0015u0018u0011u0018u0015u0005u0018u000bu0019u0001u0003u001au001bu0013u001bu001cu0003
u0004
u0002u0015u0018u0011u0018u0015u0005u0018u000bu0019u0001u0003u001au001bu0013u001bu001cu0003
hu0001u0002u0003u0004u0005u0006u0007u0003bu0001u0006u0007	
u000bu000bu0001
u000fu0019u0005u0018u0005u0018u0002u0001u0003
u000fu0019u0005u0018u0005u0018u0002u0001u0003		u0004u0005u0006u0007u0002u0019u0005
u0004u0005u0006u0007u0002u0019u0005
u000fu0019u0005u0018u0005u0018u0002u0001u0003
u000fu0019u0005u0018u0005u0018u0002u0001u0003u001e u0002
u0012u0005fu0002u0019u0005u0003u0019u0007u0003u001fu000bu0006u0012u0001u0002
 u0002
u0012u0005fu0002u0019u0005u0003u0019u0007u0003u001fu000bu0006u0012u0001u0002
u000fu0019u0005u0018u0005u0018u0002u0001u0003u001e!u0012u000bu0011u0002u0001u0001u000bu0012"u0003!u0012u000b#u0002u0015u0005u0003u0019u0007u0003
u0004u0002u0015u0005u0018u000bu0019u0001
u000fu0013u0014u0003 u0018$u0012fu0003u0001u0016u000b%u0018u0019$u0003u0012u0002u000eu0005u0018u000bu0019u0001u0016u0018
u0001
u001fu0001u0002u0003u0004u0005u0006u0007bu0003
u001fu0001u0002u0003u0004u0005u0006u0007bu0003		 u001d
u000fu0010f
u000eu0002u0003u001f&'!()*u0003 u0005+u0001u0002
u000fu0010f
u000eu0002u0003u001f&'!()*u0003 u0005+u0001u0002
Œ u0006u001au0004u0010	u0006u0011u0006u0007u0003bu0001
fu0001u0003u0013u0006u0001#
u0011u0016u000eu0007u0018u0001
$

u0006	bu0010u0011u0016u000bu0010fu0010u0006u0005u0001f
	u0001u0010u000bu000bu0004bu0003	u000eu0003u0010
u0006u0001u0016u0004	u0016
bu0006b%
& u001fu0013u0006u0001u000f
u0011u0016

You might also like