0% found this document useful (0 votes)
6 views8 pages

DBMSAssignment 2164

The document describes the normalization of tables in a database for a university management system. It starts with the tables in 0NF and 1NF and describes issues with attributes having multiple values. It then shows the tables in 2NF and 3NF. Finally, it provides the tables in final normalized form and SQL code to create the tables. Key points are that some attributes are moved to separate tables, like department phone and head/coordinator IDs, to eliminate multiple values for attributes.
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)
6 views8 pages

DBMSAssignment 2164

The document describes the normalization of tables in a database for a university management system. It starts with the tables in 0NF and 1NF and describes issues with attributes having multiple values. It then shows the tables in 2NF and 3NF. Finally, it provides the tables in final normalized form and SQL code to create the tables. Key points are that some attributes are moved to separate tables, like department phone and head/coordinator IDs, to eliminate multiple values for attributes.
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/ 8

Final Assignment

Course: Database Management Systems


Student: Mohammed Fouzi Mohammed 2164
0 Normal Form:

Departments:

DeptName DeptID TotalStudyCredits DeptPhone Email HeadOfDeptID CoordinatorOfDeptID

Courses:

CourseName CourseID DeptID CourseStudyUnit Type PreqID

FacultyMembers:

Name DivisionNo JobNo Address DOB Email ID Degrees DeptID AcademicQualifications

EvaluationMethods:

CourseID Quizzes Assignments Laboratories FinalExams

DivisionPrograms:

CoordinatorID DivisionNo DivisionName FacultyMembersSumNo StudentsSumNo CoursesSumNo

Periods:

MemberID JobNo PeriodStartTime PeriodEndTime

Jobs:

JobNo JobName
First Normal Form:

- DeptPhone in Departments table can have more than one value


- A faculty member can have many qualifications and more than one degree
- A course can have many quizzes, assignments, laboratories and more than one final exam

Departments:

DeptName DeptID TotalStudyCredits Email HeadOfDeptID CoordinatorOfDeptID

Departments1:

DeptID DeptPhone

Courses:

CourseName CourseID DeptID CourseStudyUnit Type PreqID

FacultyMembers:

Name DivisionNo JobNo Address DOB Email ID DeptID

FacultMembers1:

FMID Degrees

FacultMembers2:

FMID AcademicQualifications

Quizzes:

Quiz CourseID

FinalExams:

FinalExam CourseID
Assignments:

Assignment CourseID

Laboratories:

Lab CourseID

DivisionPrograms:

CoordinatorID DivisionNo DivisionName FacultyMembersSumNo StudentsSumNo CoursesSumNo

Periods:

MemberID JobNo PeriodStartTime PeriodEndTime

Jobs:

JobNo JobName

2NF:
All Normal Attributes fully depend on their primary keys

3NF:
There are no normal attributes that determine other normal attributes

Final Form:
For the query to work correctly, HeadOfDeptID and CoordinatorOfDeptID in the table Departments will
be put in a separate table along with the DeptID.

Departments:

DeptName DeptID TotalStudyCredits Email

Departments1:

DeptID DeptPhone
Departments2:

DeptID HeadOfDeptID CoordinatorOfDeptID

Courses:

CourseName CourseID DeptID CourseStudyUnit Type PreqID

FacultyMembers:

Name DivisionNo JobNo Address DOB Email ID DeptID

FacultMembers1:

FMID Degrees

FacultMembers2:

FMID AcademicQualifications

Quizzes:

Quiz CourseID

FinalExams:

FinalExam CourseID

Assignments:

Assignment CourseID

Laboratories:

Lab CourseID

DivisionPrograms:

CoordinatorID DivisionNo DivisionName FacultyMembersSumNo StudentsSumNo CoursesSumNo

Periods:
MemberID JobNo PeriodStartTime PeriodEndTime

Jobs:

JobNo JobName

SQL Code for the tables:

Create table jobs


(
JobNo int primary key not null,
JobName varchar(20) not null,
)

create table Departments


(
DeptID int primary key not null,
DeptName varchar(20) not null,
DeptEmail varchar(20) not null,
)

create table Departments1


(
DeptID int references Departments(DeptID) not null,
DeptPhone char(10) not null,
)

create table Course


(
CourseID int primary key not null,
CourseName varchar(20) not null,
CDeptID int references Departments(DeptID),
Cunits int not null,
CPrequisitID int references Course(CourseID),
)

create table FacultyMembers


(
FMID int primary key not null,
FMDeptID int references Departments(DeptID),
FMName varchar(40) not null,
FMJobNo int references jobs(JobNo),
FMEmail varchar(20) not null,
FMDOB Date not null,
FMAddress varchar(40) not null
)

create table Dept2


(
DeptID int references Departments(DeptID),
CoordinatorOfDept int references FacultyMembers(FMID),
HeadOfDept int references FacultyMembers(FMID),
)
create table FMDegrees
(
Degree varchar(100) not null,
FMID int references FacultyMembers(FMID)
)

create table FMQualifications


(
Qualification varchar(100) not null,
FMID int references FacultyMembers(FMID)
)

create table Quizes


(
Quiz varchar(15) not null,
CourseID int references Course(CourseID),
)

create table FinalExams


(
FinalExam varchar(15) not null,
CourseID int references Course(CourseID),
)
create table Assignments
(
Assignment varchar(15) not null,
CourseID int references Course(CourseID),
)

create table Laboratories


(
Lab varchar(15) not null,
CourseID int references Course(CourseID),
)

create table DivisionProgram


(
CoordinatorID int references FacultyMembers(FMID),
DivisionNo int primary key not null,
DivisionName varchar(20) not null,
SumOfFacultyMembers int not null,
SumOfStudents int not null,
SumOfCourses int not null,
)

create table WorkPeriods


(
FMID int references FacultyMembers(FMID),
FMJobNo int references jobs(JobNo),
PeriodStart varchar(30) not null,
PeriodEnd varchar(30) not null,
)

You might also like