0% found this document useful (0 votes)
41 views

Normalisation Example Qs

The document contains details about normalizing several relations into third normal form (3NF). It includes instructions to normalize a student grade report containing student details and course grades into 0NF, 1NF, 2NF and 3NF, showing the tables and data in each form. It also asks to list the primary keys and foreign keys of the tables in 3NF. Similarly, it provides data about a student club's positions in competitions and instructs to normalize it into the four forms, showing the tables and data, and to list the keys of the 3NF tables. Finally, it gives data about a bill from an art shop with customer, salesman and product details and instructs to normalize it into

Uploaded by

hawra.sayed.ali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Normalisation Example Qs

The document contains details about normalizing several relations into third normal form (3NF). It includes instructions to normalize a student grade report containing student details and course grades into 0NF, 1NF, 2NF and 3NF, showing the tables and data in each form. It also asks to list the primary keys and foreign keys of the tables in 3NF. Similarly, it provides data about a student club's positions in competitions and instructs to normalize it into the four forms, showing the tables and data, and to list the keys of the 3NF tables. Finally, it gives data about a bill from an art shop with customer, salesman and product details and instructs to normalize it into

Uploaded by

hawra.sayed.ali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Question

Consider a table that stores information about customers and their orders, with the following
:columns

CustomerID (primary key)

CustomerName

CustomerAddress

CustomerCity

CustomerState

OrderID (primary key)

OrderDate

OrderTotal

OrderItem

OrderQuantity

Normalize it to Third Normal Form. Show all the necessary step and explanation for first and
second normal form too.

Question

Consider the following grade report of a student in different courses. The first part of the report
contains general details of the student such as ID of the student, name of the student, department
code, and department name. The second part of the report contains the details of the courses in
which the student obtained a grade. The Id of the course, name of the course, Id of the teacher,
name of the teacher, country of the teacher and the grade obtained by the student in the course is
.given in this part

(a) Normalize the report into 0NF, 1NF, 2NF and 3NF. Show the complete relations with the
given data in each normal form. [11 marks]
Student Grade Report

Student ID: S8799 Student Name: Asma

Department Code: CS Department Name: Computer Studies


TeacherNam TeacherId
Grade TeacherCountry CourseName CourseCode
e

Introduction to
A Jordan Dr.Wael T1 Computers CS01

+B Oman Dr.Talib T2 Networks CS04

B Jordan Dr.Wael T1 Web Technology CS09

.Note: Grade means the grade obtained by the student in a course

(b) List primary keys & foreign keys (if any) of all tables in 3NF in the following format.

[4 marks]

Table Name Primary key Foreign key

]Question

Consider the following position report of a student club in different competitions. The first part
of the report contains general details of the club such as code of the club, name of the club,
university code, and university name. The club participates in different competitions. The second
part of the report contains the details of the competitions in which the club participated. The Id of
the competition, name of the competition, Id of the venue, name of the venue, city of the venue
.and the position won by the club in that competition is given in this part

(a) Normalize the report into 0NF, 1NF, 2NF and 3NF. Show the complete relations with the
given data in each normal form. [11 marks]
Position report of a student club in different competitions

Club Code: C001 Club Name: Winners

University Code: AOU University Name: Arab Open University


VenueId CompetitionNam CompetitionI
Position VenueCity VenueName
e d

Student
First Kuwait Al Jahra V1 Conference CP3

Student
Third Bahrain Manama V2 Symposium CP2

First Bahrain Manama V2 Hash Code CP1

.Note: Position means the position obtained by the club in a competition

(b) List primary keys & foreign keys (if any) of all tables in 3NF in the following format.

[4 marks]

Table Name Primary key Foreign key

Question
Consider the following bill of an art shop. The first part of the bill contains details of the
customer and the salesman. The second part of the report contains the details of the product
purchased.

(a) Normalize the report into 0NF, 1NF, 2NF and 3NF. Show the complete relations with the
given data in each normal form. [10 marks]
Bill report

Customer Id: 790 Customer Name: Ahmed


Customer Address: Muscat
Salesman code: EM003 Salesman Name: Khamis

ProductCod ProductPrice QuantityPurchas


ProductName
e ed

OL988 Oil Painting 35 2

PS032 Pencil Sketch 24 1

PS451 Pencil Sketch 20 1


Note:-
QuantityPurchased depends on Customer Id and ProductCode.

b) Write suitable table names resulting in 3NF and list primary keys & foreign keys (if any) of all
tables in 3NF in the following format.

[5 marks]

Table Name Primary key Foreign key

Question
Answer the following questions related to the accommodation of guests in a hotel as shown
:below

ACCOMMODATION (room_no, guest_no, room_type, room_rate, guest_name,


guest_nationality_code,guest_nationality_name, start_date_of_stay, end_date_of_stay)

:Suppose that the following functional dependencies hold

 guest_no determines guest_name, guest_nationality_code and guest_nationality_name


 guest_nationality_code determines guest_nationality_name
 room_no determines room_type and room_rate
 guest_no and room_no determines start_date_of_stay and end_date_of_stay
a. What is the highest normal form that this relation conforms to and why? [3 Marks]
b. Normalise this relation to 3NF, showing the new relations in the manner the
relation ACCOMMODATION is shown above. Make sure you identify the primary key for each
normalized relation by underlining it [6 Marks]
c. Write simple select SQL queries to produce the required normalized relations [6 marks]

Question
Answer the following questions related to a project allocation of a company as shown below:

PROJECT_ALLOCATION (staff_id, project_code department_id, staff_name,


staff_date_of_birth, staff_salary, department_name, project_code, project_name,
hours_worked)

Suppose that the following functional dependencies hold:

 staff_id determines staff_name, staff_date_of_birth, staff_salary and department_id


 department_id determines department_name
 project_code determines project_name
 staff_id, project_code determines hours_worked

a. What is the highest normal form that this relation conforms to and why? [3 Marks]
b. Normalise this relation to 3NF, showing the new relations in the manner the
relation PROJECT_ALLOCATION as shown above. Make sure you identify the primary
key for each normalized relation by underlining it [6 Marks]
c. Write simple ‘select’ SQL queries to produce the required normalized relations [6
marks]

Question
Consider the following bill of an art shop. The first part of the bill contains details of the
customer and the salesman. The second part of the report contains the details of the product
purchased.

(a) Normalize the report into 0NF, 1NF, 2NF and 3NF. Show the complete relations with the
given data in each normal form. [10 marks]
Bill report

Customer Id: 790 Customer Name: Ahmed


Customer Address: Muscat
Salesman code: EM003 Salesman Name: Khamis

ProductCod ProductPrice QuantityPurchas


ProductName
e ed

OL988 Oil Painting 35 2

PS032 Pencil Sketch 24 1

PS451 Pencil Sketch 20 1


Note:-
QuantityPurchased depends on Customer Id and ProductCode.

b) Write suitable table names resulting in 3NF and list primary keys & foreign keys (if any) of all
tables in 3NF in the following format.

[5 marks]

Table Name Primary key Foreign key


Question
Answer the following questions related to a project allocation of a company as shown below:

PROJECT_ALLOCATION (staff_id, project_code department_id, staff_name,


staff_date_of_birth, staff_salary, department_name, project_code, project_name,
hours_worked)

Suppose that the following functional dependencies hold:

 staff_id determines staff_name, staff_date_of_birth, staff_salary and department_id


 department_id determines department_name
 project_code determines project_name
 staff_id, project_code determines hours_worked

d. What is the highest normal form that this relation conforms to and why? [3 Marks]
e. Normalise this relation to 3NF, showing the new relations in the manner the
relation PROJECT_ALLOCATION as shown above. Make sure you identify the primary
key for each normalized relation by underlining it [6 Marks]
f. Write simple ‘select’ SQL queries to produce the required normalized relations [6
marks]

You might also like