Normalization Exercise 1: Pet Id PET Name PET Type PET AGE Owner Visitdate Procedure

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6
At a glance
Powered by AI
The document content describes different normalization exercises and examples of denormalizing and normalizing data.

Each page provides text describing different aspects of normalization, such as examples of data in unnormalized, first, second and third normal form.

First, second and third normal form are described. The goal of normalization is to organize data to avoid duplication and redundancies to improve data integrity.

Normalization Exercise 1

HEALTH HISTORY REPORT

PET ID PET NAME PET TYPE PET AGE OWNER VISIT DATE PROCEDURE
246 ROVER DOG 12 SAM COOK JAN 13/2002 01 - RABIES VACCINATION
MAR 27/2002 10 - EXAMINE and TREAT WOUND
APR 02/2002 05 - HEART WORM TEST

298 SPOT DOG 2 TERRY KIM JAN 21/2002 08 - TETANUS VACCINATION


MAR 10/2002 05 - HEART WORM TEST

341 MORRIS CAT 4 SAM COOK JAN 23/2001 01 - RABIES VACCINATION


JAN 13/2002 01 - RABIES VACCINATION

519 TWEEDY BIRD 2 TERRY KIM APR 30/2002 20 - ANNUAL CHECK UP


APR 30/2002 12 - EYE WASH

UNF:

PET PET PET


PET ID NAME TYPE AGE OWNER VISITDATE PROCEDURE
JAN
01 - RABIES VACCINATION,
13/2002,
MAR 10 - EXAMINE and TREAT
27/2002, WOUND,
SAM APR
05 - HEART WORM TEST,
246 ROVER DOG 12 COOK 02/2002,
JAN
08 - TETANUS VACCINATION,
21/2002,
TERRY MAR
05 - HEART WORM TEST,
298 SPOT DOG 2 KIM 10/2002,
JAN
01 - RABIES VACCINATION,
23/2001,
SAM JAN
01 - RABIES VACCINATION,
341 MORRIS CAT 4 COOK 13/2002,
APR
20 - ANNUAL CHECK UP,
30/2002,
TERRY APR
12 - EYE WASH,
519 TWEEDY BIRD 2 KIM 30/2002,

1NF:

PET PET PET


PET ID NAME TYPE AGE OWNER VISITDATE PROCEDURE
SAM
01 - RABIES VACCINATION
246 ROVER DOG 12 COOK JAN 13/2002
SAM MAR 10 - EXAMINE and TREAT
246 ROVER DOG 12 COOK 27/2002 WOUND
SAM APR
05 - HEART WORM TEST
246 ROVER DOG 12 COOK 02/2002
TERRY
08 - TETANUS VACCINATION
298 SPOT DOG 2 KIM JAN 21/2002
TERRY MAR
05 - HEART WORM TEST
298 SPOT DOG 2 KIM 10/2002
SAM
01 - RABIES VACCINATION
341 MORRIS CAT 4 COOK JAN 23/2001
SAM
01 - RABIES VACCINATION
341 MORRIS CAT 4 COOK JAN 13/2002
TERRY APR
20 - ANNUAL CHECK UP
519 TWEEDY BIRD 2 KIM 30/2002
TERRY APR
12 - EYE WASH
519 TWEEDY BIRD 2 KIM 30/2002

2NF:

Pet: [PetId, VisitId, PetType, PetName, PetAge, OwnerId, Owner,]

Visit: [ VisitId, VisitDate, ProcedureNo, PraocedureName]

3NF:

Pet: [ PetId, PetType, PetName, PetAge, OwnerId, VisitId, ProcedureNo]

Owner: [OwnerId, Owner]

Visit: [ VisitId, VisitDate, ProcedureNo]

Procedure: [ProcedureNo, ProcedureName]

Normalization Exercise 2

INVOICE

HILLTOP ANIMAL HOSPITAL DATE: JAN 13/2002


INVOICE # 987

MR. RICHARD COOK


123 THIS STREET
MY CITY, ONTARIO
Z5Z 6G6
PET PROCEDURE AMOUNT

ROVER RABIES VACCINATION 30.00


MORRIS RABIES VACCINATION 24.00

TOTAL 54.00
TAX (8%) 4.32

AMOUNT OWING 58.32

UNF:

Invoice: [ InvoiceNumber, InvDate, CustomerName, CustomerAddress, PetId, PetName,


ProcedureNo, ProcedureName, Amount ]

1NF:

Invoice: [ InvoiceNumber, InvDate, CustomerName, CustomerAddress, PetId]

Pet: [PetId, PetName, ProcedureNo, ProcedureName, Amuont]

2NF:

Invoice: [ InvoiceNumber, InvDate, CustomerName, CustomerAddress, PetId]

Pet: [PetId, PetName ]

Procedure: [ ProcedureNo, ProcedureName ]

Amount: [ InvoiceNumber, PetId, ProcedureNo, Amount ]

3NF:
Invoice: [ InvoiceNumber, InvDate, CustomerId]

Customer: [ CustomerId, CustomerName, CustomerAddress]

Pet: [PetId, PetName ]

Procedure: [ ProcedureNo, ProcedureName ]

Amount: [ InvoiceNumber, PetId, ProcedureNo, Amount ]

Normalization Exercise 3:

SAMPLE REPORTS AND SCREENS


ABC MANUFACTURING ORDER FORM DATE: AUG 30, 2002

ORDER # 9932
MR. S.D. KURTZ SHIPPING ADDRESS: 456 NO STREET
123 THAT STREET HAMILTON, ONTARIO
TORONTO, ONTARIO L6K 5J4
A9B 8C7

PHONE: (416) 879-0045 (416) 786-3241 CUSTOMER DISCOUNT: 3%

ITEM # PRODUCT CODE DESCRIPTION QTY BACKORDERED FILLED PRICE/UNIT AMOUNT

1 FR223 HALF SIZE REFRIGERATOR 2 0 2 750.99 1501.98


2 TB101 PATIO TABLE 5 2 3 150.00 450.00
3 CH089 PATIO CHAIRS 20 0 20 35.00 700.00

TOTAL 2651.98
DISCOUNT AMT 79.56

AMOUNT OWING 2572.42

PRODUCTS INVENTORY AS AT: AUG 30, 2002

PRODUCT CODE DESCRIPTION QTY ON HAND QTY BACKORDERED PRICE


CH089 PATIO CHAIRS 140 0 35.00
FR223 HALF SIZE REFRIGERATOR 10 0 750.99
TB101 PATIO TABLE 0 2 35.00
.
.
.

ABC MANUFACTURING
PRODUCT EXPLOSION REPORT

PRODUCT CODE DESCRIPTION PART NUMB. PART DESCRIPTIONQTY REQUIRED


CH089 PATIO CHAIRS WOOD223 1 X 2 - 30" WOOD 8
SCRW110 1.25" SCREWS 26
.
.
.

TB101 PATIO TABLE WOOD995 2 X 4 - 48" WOOD 12


SCRW110 1.25" SCREWS 34
.
.
.

UNF:

ORDER [Order_no ,Order_dt, Cust_name, Cust_addr, Ship_addr, Phone1, Phone2, Cust_disc


(item#, Prod_code, Prod_desc, Qty, Filled, Price)]
1NF:

ORDER [Order_no, Order_dt, Cust_name, Cust_addr, Ship_addr, Phone1, Phone2, Cust_disc]

ORDER_ITEM [Order_no, Prod_code, Prod_desc, Qty, Filled, Price]

2NF:

ORDER [Order_no, Order_dt, Cust_name, Cust_addr, Ship_addr, Phone1, Phone2, Cust_disc]

ORDER_ITEM [Order_no, Prod_code, Qty, Filled]

PRODUCT [ prod_code, prod_desc, prod_price]

3NF:

ORDER [Order_no, Order_dt, Cust_no (FK)]

ORDER_ITEM [Order_no, Prod_code , Qty, Filled]

CUSTOMER[Cust_no, Cust_name, Cust_addr, Cust_ship_addr, Cust-phone1, Cust-phone2,


Custdisc, Cust_credlmt]

PRODUCT[Prod_code, Prod-desc, Prod_price, Prod_qoh

Normalization Exercise 4:

Gallery Customer History Form

Customer Name

Jackson, Elizabeth Phone (206) 284-6783


123 – 4th Avenue
Fonthill, ON
L3J 4S4

Purchases Made

Artist Title Purchase Date Sales Price

03 - Carol Channing Laugh with Teeth 09/17/2000 7000.00


15 - Dennis Frings South toward Emerald Sea 05/11/2000 1800.00
03 - Carol Channing At the Movies 02/14/2002 5550.00
15 - Dennis Frings South toward Emerald Sea 07/15/2003 2200.00
The Gill Art Gallery wishes to maintain data on their customers, artists and paintings. They
may have several paintings by each artist in the gallery at one time. Paintings may be bought
and sold several times. In other words, the gallery may sell a painting, then buy it back at a
later date and sell it to another customer.

UNF:

CustomerHis: [ CustomerID, CustomerName, CustomerAddr, CustomerPhone, ArtistNo,


ArtistName, Title, PurchaseDate, SalesPrice ]

1NF:

Customer: [ CustomerID, CustomerName, CustomerAddr, CustomerPhone ]

Purchases: [ CustomerID, ArtistNo, ArtistName, Title, PurchaseDate, SalesPrice ]

2NF:

Customer: [ CustomerID, CustomerName, CustomerAddr, CustomerPhone ]

Purchases: [ CustomerID, ArtistNo, ArtistName]

Title: [ ArtistName, Title, PurchaseDate, SalesPrice ]

3NF:

Normalization Exercise 5:

User View 1 - Price Update List

Department Product Aisle Price Unit of Measure


Code Number

Produce 4081 1 0.35 lb


Produce 4027 1 0.90 ea
Produce 4108 1 1.99 lb

Butcher 331100 5 1.50 lb


Butcher 331105 5 2.40 lb
Butcher 332110 5 5.00 lb

Freezer 411100 6 1.00 ea


Freezer 521101 6 1.00 ea
Freezer 866503 6 5.00 ea
Freezer 866504 6 5.00 ea

This report is used by the department managers to update the prices that are displayed in the grocery
store for these products.

You might also like