29 Oct 2012

Normalisation. Part 3

  • Software Design & Development
Second Normal Form (2NF)

Second normal form is only concerned with tables with composite keys, so our Customers table is already in 2NF. The aim of this stage of normalisation is to ensure all partial dependencies are removed.

The way we remove the partial dependencies we have in the Bookings table is to go through every attribute and question is dependency on the composite key. For example, if we consider the flightDestination field, this is dependent on the flightNo and not the CustNo and therefore needs to be removed into its own table.

We can also identify that the membership related fields are dependent on the custNo, so these will be added to the Customer table.

It is not possible for every field in our Bookings table to depend on just the one primary key so these will remain where they are. For example, bookingDate is dependent on the composite key, a customer may book different flights on different days. Therefore the flightNo needs to be known in order to identify which date that specific flight was booked. As a result of the second normalised form, there are now three tables.

Note: If you feel you ever want to change some of the tables names, this if fine. It’s good practice to name your tables appropriately.

Primary Key

Normaliastion SpreadSheet 3

Go Back

Please enter your details and we will aim to call you back the same day.