0% found this document useful (0 votes)
131 views3 pages

ER-Diagram:: To Implement. Database Design Using ER Modeling, Normalization and Implementation For Any Application

The document describes a database management systems lab aimed at implementing database design using ER modeling and normalization. It defines key concepts of ER diagrams including entities, attributes, relationships and cardinalities. It provides an example schema for a library database and shows the ER diagram. It also describes the process of normalization from 1NF to 3NF for an example health history invoice database. The result is that ER modeling and normalization were successfully executed for an application.

Uploaded by

Kaarthik Raja
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)
131 views3 pages

ER-Diagram:: To Implement. Database Design Using ER Modeling, Normalization and Implementation For Any Application

The document describes a database management systems lab aimed at implementing database design using ER modeling and normalization. It defines key concepts of ER diagrams including entities, attributes, relationships and cardinalities. It provides an example schema for a library database and shows the ER diagram. It also describes the process of normalization from 1NF to 3NF for an example health history invoice database. The result is that ER modeling and normalization were successfully executed for an application.

Uploaded by

Kaarthik Raja
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/ 3

CS8481-Database Management Systems Lab Department of CSE 2020-2021

AIM:

To implement. database design using ER modeling, normalization and implementation for


any application
ER- Diagram :

It is an Entity –Relationship diagram which is used to represent the relationship between


different entities. An entity is an object in the real world which is distinguishable from
other objects. The overall logical structure of a database can be expressed graphically by an
ER diagram, which is built up from following components.
Rectangles: represent entity sets.
Ellipses: represent attributes.
Diamonds: represent relationships among entity sets.
Lines: link attribute to entity sets and entity sets to relationships.

Mapping Cardinalities :

It expresses the number of entities to which another entity can be associated via a
relationship set. For a binary relationship set R between entity sets A and B. The Mapping
Cardinalities must be one of the following.
• One to one

• One to many

• Many to one

• Many to many

Consider the following schema for a Library Database:

BOOK (Book_id, Title, Publisher_Name, Pub_Year)

BOOK_AUTHORS (Book_id, Author_Name)

PUBLISHER (Name, Address, Phone)

BOOK_COPIES (Book_id, Branch_id, No-of_Copies)

BOOK_LENDING (Book_id, Branch_id, Card_No, Date_Out, Due_Date)

LIBRARY_BRANCH (Branch_id, Branch_Name, Address)

St.Joseph’s College of Engineering 36


CS8481-Database Management Systems Lab Department of CSE 2020-2021

ER DIAGRAM

St.Joseph’s College of Engineering 37


CS8481-Database Management Systems Lab Department of CSE 2020-2021

Consider the below Health History Report and do the normalization

UNF:
invoice [ invoice_no, invoice_date, cust_name, cust_addr, ( pet_name,
procedure, amount ) ]
1NF:
invoice [ invoice_no, invoice_date, cust_name, cust_addr ]
invoice_pet [ invoice_no, pet_id, pet_name, procedure, amount ]

note: pet_id was chose as a key because pet_name is a character string and
not a good key candidate.

2NF:
invoice [ invoice_no, invoice_date, cust_name, cust_addr ]
invoice_pet [ invoice_no, pet_id, procedure, amount ]
pet [ pet_id, pet_name ]

3NF:
invoice [ invoice_no, invoice_date, cust_no (FK) ]
invoice_pet [ invoice_no (FK), pet_id (FK), procedure, amount ]
pet [ pet_id, pet_name ]
customer [ cust_no, cust_name, cust_street, cust_city, cust_pstlcd ]

note: cust_no was chose as a key because cust_name is a character string and
not a good key candidate. The customer address was broken apart in 3NF. All
foreign keys are identified.

RESULT:

Thus for an application ER modeling and normalization is executed successfully.

St.Joseph’s College of Engineering 38

You might also like