CS403P
Database Management System(Practical)
Assignment No.2
Table 1 (First Normal Form- Single Table):
Study Duration Semester Student_CNIC Name Campus Campus Semester
Program Code City GPA
MCS 2 Years Spring2018 37405-111 Ali ATK001 Attock 3.50
Ahmad
MCS 2 Years Spring2018 37405-111 Ali ATK001 Attock 3.75
Ahmad
MCS 2 Years Fall2023 37405-018 Nimra RWP02 Rawalpindi 3.20
Khan
Certificate 6 months Fall2023 37405-018 Nimra RWP02 Rawalpindi 3.80
Course Khan
(English)
MCS 2 Years Fall2023 37405-105 Sehrish RWP02 Rawalpindi 3.85
Iqbal
MCS 2 Years Spring2023 37405-128 Ahmed ISB03 Islamabad 3.50
Sarwar
Certificate Spring2018 37405-111 Ali ATK001 Attock 3.90
Course 6 months Ahmad
(IT)
MS 3 Years Fall2023 37405-111 Ali ATK001 Attock 3.5
Ahmad
MS 3 Years Spring2023 37405-111 Ali ATK001 Attock 3.9
Ahmad
BS 4 Years Spring2023 37405-100 Akmal LHR01 Lahore 3.2
Naeem
Functional Dependencies:
1. StudyProgram, Semester, Student_CNIC Duration, Name, CampusCode,
CampusCity, SemesterGPA
This represents the primary key and provides all other attributes.
2. Student_CNIC Name
Student_CNIC uniquely determines the names.
3. StudyProgram, CampusCode Duration
The combination of StudyProgram and CampusCode determines the duration of
the program.
4. StudyProgram, CampusCode CampusCity
The combination of StudyProgram and CampusCode determines the campus city.
5. StudyProgram, Semester SemesterGPA
The combination of StudyProgram and Semester determines the GPAfor the
semester.
6. (StudyProgram, Semester, Student_CNIC) Name
The combination of StudyProgram, Semester and Student_CNIC uniquely
determines the student’s name.
7. (Student_CNIC, Semester) SemesterGPA
The combination of Student_CNIC and Semester determines the GPA for that
semester.
Partial Dependency:
There are no partial dependencies in this table. All non-prime attributes are fully
dependent on the composite primary key {Studyprogram, Semester,
Student_CNIC}.
Transitive Dependency:
There are no transitive dependencies in this table. All non-prime attributes are
directly dependent on the composite primary keys.
Table 1: Student Information
Student_CNIC Name
37405-111 Ali Ahmed
37405-018 Nimra Khan
37405-105 Sehrish Iqbal
37405-128 Ahmed Sarwar
37405-100 Akmal Naeem
Table 2: Program Duration
Study Campus Duration Campus City
Program Code
MCS ATK001 2 Years Attock
Certificate RWP02 6 months Rawalpindi
Course
(English)
Certificate ATK001 6 months Attock
Course (IT)
MS ATK001 3 Years Attock
BS LHR01 4 Years Lahore
Table 3: Semester GPA
Study Semester Student Name Semester
Program CNIC GPA
MCS Spring2018 37405-111 Ali Ahmad 3.50
MCS Spring2018 37405-111 Ali Ahmad 3.75
MCS Fall2023 37405-018 Nimra 3.20
Khan
Certificate Fall2023 37405-018 Nimra 3.80
Course Khan
(English)
MCS Fall2023 37405-105 Sehrish 3.85
Iqbal
MCS Spring2023 37405-128 Ahmed 3.50
Sarwar
Certificate Spring2018 37405-111 Ali Ahmad 3.90
Course (IT)
MS Fall2023 37405-111 Ali Ahmad 3.5
MS Spring2023 37405-111 Ali Ahmad 3.9
BS Spring2023 37405-100 Akmal 3.2
Naeem
Functional Dependencies:
{Studyprogram, Semester, Student_CNIC} {Name, Semester GPA} (No partial
or Transitive dependencies).
Partial Dependency is in Table 2: Program Duration.
No Transitive Dependencies are present in any of the tables.