Data Normalization

Data Normalization and Personal Trainer

Normalization is the process of creating a table design by assigning specific fields or attributes to each table in the database.  Normalization is used to develop an overall database design that is simple, flexible, and free of data redundancy.  There are four stages in the normalization process:  1) unnormalized design 2) first normal form (1NF) 3) second normal form (2NF) and 4) third normal form (3NF).  The 3NF represents the best design because it avoids redundancy and data integrity problems that still can exist in the prior three forms.  The unnormalized design form exist when the table contains a repeating group.  A repeating group is asset of one or more fields that can occur any number of times in a single record, with each occurrence having different having different values.  A table is said to be in 1NF when it does not contain a repeating group.  A table is said to be in 2NF when it is in 1NF and if all fields that are not part of the primary key are functionally dependent on the entire primary key.  Finally, a table is said to be in 3NF when it’s in 2NF and every nonkey filed depends on the key, the whole key, and nothing but the key.

Normalization is an important part of the system design phase for Personal Trainer Inc because it will assist in a successful database design.  Without normalization the database system could be inaccurate, slow, inefficient, and may not produce the reports that Personal Trainer Inc expects.  By normalizing the database it will minimize the amount of duplicate data stored in the database, it will organize the date so when Personal Trainer Inc modifies it they only have to make the change in one place, it will allow Personal Trainer Inc to access and modify the data quickly and efficiently without compromising the integrity of the data in storage, and it will arrange the data in a logical order.

These are proposed tables for Personal Trainer in 3NF

MEMBER Member_id, lname, fname, age, addr, phone_num, exp_date
CLASSES Class_id, date, start_time, finish_time, location, cost
MERCHANDISE Merchandise_id, description, size, color, price
INSTRUCTOR Instructor_id, lname, fname,

Tables with sample data for Personal Trainer Inc.

MEMBER

Member_id Lname Fname Age Addr Phone_num Exp_date
10001 Smith Robert 35 340 Ridge Rd Raleigh, NC 27609 919-354-0934 11/2017
10002 Williams Ken 20 10 Spoon Cir Durham, NC 27703 919-935-0035 03/2017
10003 Schnell Drew 43 289 Forest Ln Raleigh, NC 27612 919-289-7260 12/2016

Classes

Class_id Date Start_time Finish_time Location Cost
Spin class 12/04/2016 5:00pm 6:00pm Studio 1A 175.00
Dance fitness 12/13/2016 7:00pm 8:30pm Studio 3 100.00
Cardio boxing 11/30/2016 4:30pm 5:30pm Studio 4B 150.00

MERCHANDISE

Merchandise_id Description Size Color price
201 UA shirt Large Red 45.00
202 Nalgene bottle 48oz Black 20.00
203 Gloves Large Blue/Black 35.00

INSTRUCTOR

Instructor_id Lname fname
301 Scott Greg
302 Thompson Bradley
303 Davis Trent