You are on page 1of 8

Database Systems Sumayyah Mazhar(074)

Assignment 2 BSE-IV-A&B

Due Date: May 28th, 2021 Marks : 10


CLO2 Design conceptual, logical and physical database schemas using different
data models.

CLO3 Identify functional dependencies and resolve database anomalies by


normalizing database tables.

You have to design a database system for any organization. Start with the process
of mini-world analysis of your chosen system. Identify important entities and
business rules. Prepare ER diagram. Then convert it to relational model. In the next
step apply necessary normalization on these relations, and finally prepare
normalized database design
LIBRARY MANAGEMENT SYSTEM
SCHEMAS

Staff Members:

MName Staff_Id
Books:

ISBN Title Price Category

Publisher:

P_Id PName Year of Publication

Readers:

User_Id RName Address Phone#


ENTITY RELATIONSHIP DIAGRAM:

Category
Price
Member

MName Title
ISBN

Staff Members
s 1 Maintains
N Book
M N N
Staff_Id

Publishes

RName Keeps
Track of 1

PName
Phone#
Publisher
N
Address Readers P_Id
Year of
1 Borrowed/ Publication
User_Id
Return
Date

Borrowed Due Date


Date

Return Date
RELATIONAL MODEL:

Category
Price
Member

MName Title
ISBN

Staff Members
s 1 Maintains
N Book

Staff_Id

Staff Members entity has one to many relationship with Book entity. 1
Staff Member can maintain many books. ISBN and Staff_Id are the primary keys.

Book:

ISBN Staff_Id Title Category Price

Staff Members entity and Readers entity Have a many to many


MName
Staff_Id and User_Id are the Primary Keys.

Staff Members
s Many Staff Members can keep track of many Readers

M Lookup Table:
Staff_Id
Readers Track:

Keeps
RName Staff_Id User_Id
Track of

Phone# N

Address Readers

User_Id

Category
Price
Member
In Publisher Entity and Book Entity there is
Title
ISBN
1 to many relationship. 1 Publisher can publish many

Books. ISBN and P_Id are the Primary Keys Book


Book:

ISBN P_Id Title Category Price


Publishes

PName
Publisher

P_Id

Year of
Publication

Category
Price
Member
RName
Phone# Title
ISBN

Borrowed/
Readers
1 N Book
Return
Date

Address User_Id

In Reader entity and Books Entity there is a 1 to many relationship. 1 Reader can
borrow many books.

Book:

ISBN User_Id Title Category Price

NORMALIZATION:
Book:

ISBN Staff_Id Title Category Price

1NF: Table is already in 1st Normal Form

2NF:

Functional Dependencies:

ISBN, Staff_Id = Title, Category, Price

 ISBN= Title, Category, Price

ISBN Title Category Price

3NF:

Transitive Dependencies:

There is a Transitive Dependency in the table.

ISBN Title

Title Category

BCNF:

This relation is in BCNF.

4NF:

This relation is in 4NF.

Readers Track:

Staff_Id User_Id
No Normalization.

Book:
ISBN P_Id Title Category Price

1NF: Table is already in 1st Normal Form

2NF:

Functional Dependencies:

ISBN, P_Id = Title, Category, Price

 ISBN= Title, Category, Price

ISBN Title Category Price

3NF:

Transitive Dependencies:

There is a Transitive Dependency in the table.

ISBN Title

Title Category

BCNF:

This relation is in BCNF.

4NF:

This relation is in 4NF.

Book:

ISBN User_Id Title Category Price

1NF: Table is already in 1st Normal Form

2NF:
Functional Dependencies:

ISBN, User_Id = Title, Category, Price

 ISBN= Title, Category, Price

ISBN Title Category Price

3NF:

Transitive Dependencies:

There is a Transitive Dependency in the table.

ISBN Title

Title Category

BCNF:

This relation is in BCNF.

4NF:

This relation is in 4NF.

You might also like