Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Assignment On:

Normalize the database into 3NF

Submitted to:
Dr.Ramzan Talib

Group Members:
Waleed Raza Butt Mavia Rasheed Ateeb Aslam Haider Imran BCS-FA10-197 BCS-FA10-085 BCS-FA10-078 BCS-FA10-061

Muhammad Imran BCS-FA10-107

Submitted On
December 20, 2011

COMSATS University of Science and Technology, Lahore Department of Computer Science

Normalize the database into 3NF Example Hotel Management System


StudentID SName FName City CNIC Cell HostelDues Wing# Room# HostelName MessBill MessUnit CGPA

001 002 003 004 005

Waleed Tahir Mavia Ateeb Haider Imran

LLM

007

123 24000 345 24000 678 24000 912 24000 367 24000

A A B B A

12 10 11 13 13

NY Hostel Jupiter Hostel Pluto Hostel NY Hostel NY Hostel

2140 2309 1987 2499 2493

1815 1970 1635 2107 2109

3.3 3.4 3.5 4.0 4.0

Rasheed BWP 005 Aslam Imran Riaz OKR GUJ GUJ 002 001 008

1NF Design
StudentID SName FName City CNIC Cell HostelDues Wing# Room# HostelName MessBill MessUnit

001 002 003 004 005

Waleed Tahir Mavia Ateeb Haider Imran

LLM

007

123 24000 345 24000 678 24000 912 24000 367 24000

A A B B A

12 10 11 13 13

NY Hostel Jupiter Hostel Pluto Hostel NY Hostel NY Hostel

2140 2309 1987 2499 2493

1815 1970 1635 2107 2109

Rasheed BWP 005 Aslam Imran Riaz OKR GUJ GUJ 002 001 008

Second Normalized Form

2NF Dependencies Fd1: StudentID,CNIC,Cell SName,FName,City (Primary key) Fd2: StudentID HostelName,Wing#,Room#,HostelDues (Partial Dependency) Fd3: Wing# Room# (Transitive Dependency) Fd4: StudentID MessUnit,MessBill (Partial Dependency) Fd4: MessUnit MessBill (Transitive Dependency)

2NF Design

StudentID

SName

FName Wing#

Cell

CNIC Room# MessBill

City

StudentID HostelName StudentID

HostelDues

MessUnit

Third Normalized Form


3NF Dependencies Student StudentID,CNIC,Cell SName,FName,City (Primary key) Hostel StudentID HostelName,Wing#,HostelDues (Partial Dependency) RoomDetail Wing# Room# (Transitive Dependency) Mess StudentID MessUnit (Partial Dependency) MessPay MessUnit MessBill (Transitive Dependency)

3NF Design Student Hostel RoomDetail Mess MessPay StudentID SName FName Cell Wing# Room# MessUnit MessBill CNIC HostelDues City

StudentID HostelName Wing# StudentID MessUnit

You might also like