Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

South Birmingham College

Normalisation

Rajibul Haque Shumon


Invoice Date Customer Customer Customer Name Customer Customer Tel. Item Item Unit Unit Price Quantity Item Total
ID No. Order No. Address No. Code Description Price
5421 4-OCT-10 C123 6412 Ace Computing 56 Main Road 0121 456 8754 F56 USB Flash Box 10 £25.00 10 £250.00
Sparkhill Drive
Birmingham
B11 2SP
5421 4-OCT-10 C123 6412 Ace Computing 56 Main Road 0121 456 8754 C2 CD-RW x8 800 Box 5 £1.99 20 £39.80
Sparkhill MB
Birmingham
B11 2SP
5421 4-OCT-10 C123 6412 Ace Computing 56 Main Road 0121 456 8754 C3 DVD-RW x16 Each £1.00 12 £12.00
Sparkhill 4.0 GB
Birmingham
B11 2SP
5422 4-OCT-09 C901 A48 P&W Systems 99 High Street 0121 223 887 PR 4 Pentium 4 – Each £270.00 1 £270.00
Kings Heath 3.2GHz
Birmingham
B14 1SP
5422 4-OCT-09 C901 A48 P&W Systems 99 High Street 0121 223 887 SC12 Easy Clean Box 200 £10.00 1 £10.00
Kings Heath Wipes
Birmingham
B14 1SP
5423 5-OCT-09 C765 n/a Hall Green Craft 21 Cole Bank 0121 694 3698 Wstar DPX 110 Each £35.00 5 £175.00
Shop Ltd Road Broadband
Hall Green Modem
Birmingham
B28 7HG
5423 5-OCT-09 C765 n/a Hall Green Craft 21 Cole Bank 0121 694 3698 SC12 Easy Clean Box 200 £10.00 100 £1000.00
Shop Ltd Road Wipes
Hall Green
Birmingham
B28 7HG

2|Page
Rajibul Haque Shumon South Birmingham College S45208512
Invoice Item
Code
5421 F56 UNF-The data in above table is currently in UNF (Un-normalised Form) or 0NF. Data in this table is repeating and does not
have a Primary Key to uniquely identify them.
5421 C2
UNF 1NF 2NF 3NF
Invoice
5421 C3
Date
Customer ID No.
5422
CustomerPROrder
4
No.
Customer Name
CustomerSC12
5422 Address
Customer Tel. No.
Item
5423 CodeWstar
Item Description
Unit
5423 SC12
Unit Price
Quantity
Item Total Price

Grid: 1

1NF-For this table we need to eliminate the repeating data by putting a suitable Primary Key. The Primary Key must
uniquely identify the record and it cannot be null. A Primary Key can be one field or combination of two or more field.
After consideration of all the suitable field to be Primary Key, we can see that only the combination of Invoice number and
Item code are suitable for the Primary Key criteria. These two fields will make a Compound key which is unique for any
records on that table.

This table shows that the combinations between these two fields are unique in whole table.

3|Page
Rajibul Haque Shumon South Birmingham College S45208512
UNF 1NF 2NF 3NF
Invoice Invoice
Date Date
Customer ID No. Customer ID No.
Customer Order No. Customer Order No.
Customer Name Customer Name
Customer Address Customer Address
Customer Tel. No. Customer Tel. No.
Item Code Item Code
Item Description Item Description
Unit Unit
Unit Price Unit Price
Quantity Quantity
Item Total Price Item Total Price
Table: 2
Grid: 2
2NF-To put the table in 2 nd
normalisation field, the dependency of each field needs to be identified in relation to the Primary Keys.

Invoice Item Code


Date Yes
Customer ID Number Yes
Customer Order Number Yes
This shows the dependency of all the fields
against Invoice and Item Code.

4|Page
Rajibul Haque Shumon South Birmingham College S45208512
Invoice Date Customer Customer Customer Name Customer Customer Tel.
ID No. Order No. Address No.
5421 4-OCT-10 C123 Customer
6412 NameAce Computing Yes
56 Main Road 0121 456 8754
Customer Address Sparkhill Yes
Birmingham
Customer Telephone Number B11 2SP
Yes
5422 4-OCT-09 C901 ItemA48
DescriptionP&W Systems 99 High Street Yes
0121 223 887
Unit Kings Heath Yes
Unit Price Birmingham Yes
Quantity B14 1SP Yes Yes
5423 5-OCT-09 C765 n/a Hall Green Craft 21 Cole Bank 0121 694 3698
Item Total PriceShop Ltd Road
Yes Yes
Hall Green Grid: 3
Birmingham
B28 7HG

This table shows the dependency for the field


Invoice Item Item Unit Unit Price Quantity Item Total
Invoice from the main table.
Code Description Price
5421 F56 USB Flash Box 10 £25.00 10 £250.00
Drive

5421 C2 CD-RW x8 800 Box 5 £1.99 20 £39.80


MB

5421 C3 DVD-RW x16 Each £1.00 12 £12.00


4.0 GB
Table: 3
5422 PR 4 UNF
Pentium 4 – Each 1NF
£270.00 1 2NF
£270.00 3NF
3.2GHz
Invoice Invoice Invoice
5422 DateSC12 Easy Clean Date
Box 200 £10.00 1 Item Code*£10.00 This table shows the dependency
Customer IDWipes
No. Customer ID No. Date and transitional dependency of
Customer Order No. Customer Order No. Customer ID No. the fields against Item Code and
5423 Wstar DPX 110 Each £35.00 5 £175.00
Customer NameBroadband Customer Name Customer Order No.
Customer Address Customer Address Customer Name Invoice.
Modem
5423 Customer
SC12 Tel. No.
Easy Clean Customer
Box 200 Tel. No.
£10.00 100Customer Address
£1000.00
Item Code Wipes Item Code Customer Tel. No.
Item Description Item Description
Unit Unit Item Code
Unit Price Unit Price Item Description
Quantity Quantity Unit
Item Total Price Item Total Price Unit Price 5|Page
Rajibul Haque Shumon Quantity
South Birmingham College S45208512
Item Total Price
3NF-For 3rd normalisation field, we need to check that all the non-key fields are functionally dependent on the Primary Keys and not to any
other fields.

Table 3- Date is functionally dependant on Invoice number and the Customer ID number but Customer Order Number, Customer Name,
Customer Address and Customer Telephone Number is transitionally dependant on Invoice number but functionally dependant on Customer
ID number. We will split these fields, which are dependent on Customer ID Number, into a new table and assign the Customer ID number as
Primary Key as all other fields are dependent on that.

Table 4: Item Description, Unit and Unit Price are functionally dependent on Item code but Quantity and Item Total Price are functionally
dependent on both the Invoice and Item Code. So, now we can split the Item Code into a new table and put all the fields dependent on Item
Code and make Item Code the Primary Key for that table.

6|Page
Rajibul Haque Shumon South Birmingham College S45208512
UNF 1NF 2NF 3NF
In this as you can see that all the
Invoice No. Invoice No. Invoice No. Invoice No.
Normalisation field is present
Date Date Date Item Code*
Customer ID No. Customer ID No. Customer ID No. Customer ID No.* and all the tables are in 3NF
Customer Order No. Customer Order No. Customer Order No. Date which is equal to BCNF,
Customer Name Customer Name Customer Name Quantity therefore, they can be
Customer Address Customer Address Customer Address Item Total Price implemented.
Customer Tel. No. Customer Tel. No. Customer Tel. No.
Item Code Item Code Customer ID No.
Item Description Item Description Invoice No.* Customer Order No.
Unit Unit Item Code Customer Name
Unit Price Unit Price Item Description Customer Address
Quantity Quantity Unit Customer Tel. No.
Item Total Price Item Total Price Unit Price
Quantity Item Code
Item Total Price Item Description
Unit
Unit Price

Grid: 5

7|Page
Rajibul Haque Shumon South Birmingham College S45208512
ERD
Customer Item

Invoice

Data Dictionary:
Invoice Number Item Code* Customer ID No.* Date Quantity Item Total Price
5421 F56 C123 4-OCT-10 10 £250.00
5421 C2 C123 4-OCT-10 20 £39.80
5421 C3 C123 4-OCT-10 12 £12.00
5422 PR 4 C901 4-OCT-09 1 £270.00
5422 SC12 C901 4-OCT-09 1 £10.00
5423 Wstar C765 5-OCT-09 5 £175.00
5423 SC12 C765 5-OCT-09 100 £1000.00
Table: Invoice

8|Page
Rajibul Haque Shumon South Birmingham College S45208512
Customer ID No. Customer Order No. Customer Name Customer Address Customer Tel. No.
C123 6412 Ace Computing 56 Main Road 0121 456 8754
Sparkhill
Birmingham
B11 2SP
C901 A48 P&W Systems 99 High Street 0121 223 887
Kings Heath
Birmingham
B14 1SP
C765 n/a Hall Green Craft Shop Ltd 21 Cole Bank Road 0121 694 3698
Hall Green
Birmingham
B28 7HG
Table: Customer

Item Code Item Description Unit Unit Price


F56 USB Flash Drive Box 10 £25.00
C2 CD-RW x8 800 MB Box 5 £1.99
C3 DVD-RW x16 4.0 GB Each £1.00
PR 4 Pentium 4 – 3.2GHz Each £270.00
SC12 Easy Clean Wipes Box 200 £10.00
Wstar DPX 110 Broadband Modem Each £35.00
Table: Item

9|Page
Rajibul Haque Shumon South Birmingham College S45208512

You might also like