DATABASE SYSTEMS (EC-334):
BSCE (5th semester)
Assignment # 02
Submitted To:
Dr. Saad Rehman
Submitted By:
Neyan Saif
Reg. No:
17-CE-031
Department of Computer Science & Engineering
HITEC University, Taxila
Q # 1: Create two tables of your own choice and insert 5 records in each table (Show them).
Now implement all type of joins we have studied in those tables and show results.
Solution:
Q # 3: Consider table given below:
Employee Department Salary_Slip Employee Department Salary Street City Zip
No No No. Name
1 101 001 Faisal OBIEE 45000 5 Rwp 44
2 102 002 Kulsom COGNOS 50000 6 Lhr 42
3 101 003 Junaid OBIEE 51000 7 Psh 41
Apply all three normalization forms on the given table so that no anomaly occurs.
Solution:
This table is already in 1NF from so we apply 2NF.
Employee Employee Salary Salary Street City Zip
no Name Slip no
1 Faisal 001 45000 5 Rwp 44
2 Kulsom 002 50000 6 Lhr 42
3 Junaid 003 51000 7 Psh 41
2NF
EMPLOYEE TABLE
EM_DEPARTMENT TABLE
Department No Department Name
101 OBIEEE
102 COGNOS
3NF
EMPLOYEE TABLE
Department No Department Name
101 OBIEEE
102 COGNOS
Employee No Employee Name
1 Faisal
2 Kulsom
3 Junaid
EM_DEPARTMENT TABLE
THE END