0% found this document useful (0 votes)
8 views

ERD Examples

The document contains an ER diagram showing entity types of EMPLOYEE, DEPARTMENT, PROJECT and relationships between them. It also includes cardinality constraints and participation constraints.

Uploaded by

manjeet.amity3
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)
8 views

ERD Examples

The document contains an ER diagram showing entity types of EMPLOYEE, DEPARTMENT, PROJECT and relationships between them. It also includes cardinality constraints and participation constraints.

Uploaded by

manjeet.amity3
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/ 8

The (min,max) notation

(0,1) (1,1)
Employee Manages Department

(1,1) (1,N)
Employee Department
Works-for

Prepared By: Dr. Shalini Bhaskar Bajaj


SUMMARY OF ER-DIAGRAM
NOTATION FOR ER SCHEMAS
Symbol Meaning

ENTITY TYPE

WEAK ENTITY TYPE

RELATIONSHIP TYPE

IDENTIFYING RELATIONSHIP TYPE

ATTRIBUTE

KEY ATTRIBUTE

MULTIVALUED ATTRIBUTE

COMPOSITE ATTRIBUTE

DERIVED ATTRIBUTE

TOTAL PARTICIPATION OF E2 IN R

CARDINALITY RATIO 1:N FOR E1:E2 IN R

STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION OF


E IN R
E1 R E2

E1 N E2
R

(min,max)
R E

Prepared By: Dr. Shalini Bhaskar Bajaj


ER DIAGRAM – Entity Types are:
EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT

Prepared By: Dr. Shalini Bhaskar Bajaj


COMPANY ER Schema Diagram
using (min, max) notation

Prepared By: Dr. Shalini Bhaskar


Bajaj
Designing an ER Diagram

Consider the following set of requirements for a University database. Design an ER diagram
for this application:

• The university keeps track of each student's name, student number, social security number,
current address and phone number, permanent address and phone number, birthdate, sex,
class (freshman, graduate), major department, minor department (if any), degree program
(B.A., B.S., ... Ph.D.). Some user applications need to refer to the city, state, and zip code of
the student's permanent address and to the student's last name. Both social security number
and student number are unique for each student. All students will have at least a major
department.
• Each department is described by a name, department code, office number, office phone, and
college. Both the name and code have unique values for each department.
• Each course has a course name, description, course number, number of credits, level and
offering department. The course number is unique for each course.
• Each section has an instructor, semester, year, course, and section number. The section
number distinguishes sections of the same course that are taught during the same semester/
year; its value is an integer (1, 2, 3, ... up to the number of sections taught during each
semester).
• A grade report must be generated for each student that lists the section, letter grade, and
numeric grade (0,1,2,3, or 4) for each student and calculates his or her average GPA.

Prepared By: Dr. Shalini Bhaskar Bajaj


University ER Diagram

Degree DName DCode OfficeNumber


Name StudentID SSN
Major In
Birth date
OfficePhone
Department
Sex Student
College
Class Minor In

Address

City State Zip


Offer

CName

Grade_Report
CourseDesc
Letter Grade Instructor Year Course
CNumber
GPA
Credits
Numeric Grade Section Belong_To

SectionNumber Semester

Prepared By: Dr. Shalini Bhaskar Bajaj


ER DIAGRAM FOR A BANK
DATABASE

© The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, Fundamentals of Database Systems, Second Edition

Prepared By: Dr. Shalini Bhaskar Bajaj


FIGURE 3.17
An ER diagram
for an AIRLINE
database
schema.

Prepared By: Dr. Shalini Bhaskar Bajaj

You might also like