Tutorial On Normalization
Tutorial On Normalization
Normalization In-Class
Exercise
1. Convert the Big Patient
rd
Table into 3 normal form.
The functional dependencies
are shown
in Table 2 for your reference.
Draw the functional
dependency diagram, and
show the result
of each step in the
normalization process.
Table 1 Sample Data for the
Big Patient Table
VisitNo VisitDate PatNo PatAge
PatCity ProvNo ProvSpecialty
Diagnosis
V10020 1/13/2007 P1 35 DENVER
D1 INTERNIST EAR INFECTION
V10020 1/13/2007 P1 35 DENVER
D2 NURSE PRACTIONER
INFLUENZA
V93030 1/20/2007 P3 17
ENGLEWOOD D2 NURSE
PRACTIONER PREGNANCY
V82110 1/18/2007 P2 60
BOULDER D3 CARDIOLOGIST
MURMUR
Table 1 Sample Data for the Big Patient Table
ProvNo ProvSpecialty
2. A travel agency manages flight bookings for its clients. For each booking, the agency creates a
booking itinerary. The following rules are applied to the itineraries:
● A booking is made for a single person. Each booking is identified by a unique booking number. A
person may have one or more bookings with the travel agency.
● A booking may involve one or many flights. Each flight is identified by the flight number.
A flight number is unique for a given flight route and time of the day. The flight number will be re-
used across different days to represent the same scheduled trip. However, airlines use a different flight
number to represent each scheduled trip on the same day. For example, flight number QF47 represents
a flight which departs from Sydney and flies to Melbourne at 7:30 PM. Flight QF47 may, for
example, be scheduled to fly on each day of the week.
● The duration of the flight does not need to be kept in the database, it is only printed on the itinerary
based on the calculation of the difference between the departure date/time and the arrival date/time.
SAMPLE ITINERARIES
Three sample itineraries are supplied below:
1. Represent this booking data in UNF. Note that the three itineraries shown are three examples of the
same form, only one UNF is required that would cover all three examples.
2. Convert this UNF to first normal form (1NF) and show all dependencies via dependency diagrams.
Continue the normalisation through to third normal form (3NF). Clearly write the relations in each
step from the unnormalised form (UNF) to the third normal form (3NF). You may consolidate the
relations after arriving at 3NF (if necessary).