Database Normalization Exercise Guide
Database Normalization Exercise Guide
Exercise Guide
Apply the normalization rules to the following exercises.
1. A non-normalized data does not comply with any normalization rule. To explain with an example in what
each of the rules consists of, we will consider the data from the following table.
Orders
Id_orden Date Id_cliente Nom_cliente Estado Num_art nom_art can't Price
2301 23/02/11 101 Martin Caracas 3786 Red 3 35.00
2301 23/02/11 101 Martin Caracas 4011 Racket 6 65.00
2301 23/02/11 101 Martin Caracas 9132 Paq-3 8 4.75
2302 25/02/11 107 Herman Chorus 5794 Paq-6 4 5.00
2303 27/02/11 110 Peter Maracay 4011 Racket 2 65.00
2303 27/02/11 110 Peter Maracay 3141 Fund 2 10.00
The records are now conformed into two tables that we will call ORDERS and
ORDER_ARTICLES
Orders
Id_orden Date Id_cliente Nom_cliente State
2301 23/02/11 101 Martin Caracas
2302 25/02/11 107 Herman Chorus
2303 27/02/11 110 Peter Maracay
Order_Items
Id_orden Num_art nom_art can't Price
2301 3786 Red 3 35,00
2301 4011 Racket 6 65.00
2301 9132 Paq-3 8 4.75
2302 5794 Paq-6 4 5,00
2303 4011 Racket 2 65.00
2303 3141 Fund 2 10.00
1/9
Database Normalization Exercises Guide
The ORDERS table is in 2NF. Any unique value of ORDER_ID determines only one value.
for each column. Therefore, all the columns are dependent on the primary key
ID_ORDEN.
For its part, the TABLE ARTICLES_ORDERS is not in 2NF since the columns
PRICE and NOM_ART are dependent on NUM_ART, but they are not dependent on
ORDER_ID. What we will do next is remove these columns from the table.
ARTICLES_ORDERS and create a TABLE ARTICLES with those columns and the primary key
on which they depend.
Order Articles
Id_orden Num_art can't
2301 3786 3
2301 4011 6
2301 9132 8
2302 5794 4
2303 4011 2
2303 3141 2
Articles
Num_art nom_art Price
3786 Red 35.00
4011 Racket 65,00
9132 Paq-3 4.75
5794 Paq-6 5,00
3141 Fund 10.00
2/9
Database Normalization Exercise Guide
Create a second table with those columns and with the non-key column of which they are.
dependents.
Upon observing the tables we have created, we realize that both the ARTICULOS table and
The ARTICULOS_ORDENES table is in 3NF. However, the ORDENES table is not.
is, since NOM_CLIENTE and ESTADO are dependent on ID_CLIENTE, and this column is not
the primary key.
To normalize this table, we will move the non-key columns and the key column from which
dependent within a new CLIENTS table. The new CLIENTS and ORDERS tables are
shown below.
Orders
Id_orden Date Id_cliente
2301 23/02/11 101
2302 25/02/11 107
2303 27/02/11 110
Orders
Id_cliente Nom_cliente State
101 Martin Caracas
107 Herman Chorus
110 Peter Maracay
[Link] SALE INVOICE: The company COLOMBIAN SYSTEMS has contracted you as the
"In Charge Engineer" to systematize billing. In the following SALES PURCHASE INVOICE,
you must analyze all available information and apply the normalization process until reaching the
Third Normal Form.
A detailed justification of each of the steps that lead to the result is requested.
final.
3/9
Database Normalization Exercise Guide
Where:
3. SHIPPING COMPANY: below are grouped all the attributes that are part
from the database to apply normalization rules. Where the names of the
atributos con su significado
* GUIA_NO = Numero de Guia
* GUIA_FECHA= Fecha de la Guia
* GUIA_HORA= Hora de la Guia
* ORGN_RIF = Identificacion de Empresa Origen
* ORGN_NOM = Nombre de Empresa Origen
ORGN_ACT = Commercial Activity of Origin Company
* ORGN_CIUDAD= Ciudad de Empresa Origen
* ORGN_DIR = Direccion de Empresa Origen
* ORGN_TEL = Telefono de Empresa Origen
ORGN_CEL = Origin Company Cellular
* DEST_ID = Identificacion del destinatario
* DEST_NOM = Nombre del destinatario
* DEST_COD_CIUDAD = Codigo de la ciudad del destinatario
* DEST_CIUDAD= Ciudad del destinatario
* DEST_DIR = Direccion del destinatario
* DEST_TEL = Telefono del destinatario
* DEST_KM = Distancia kilometraje de Ciudad origen a ciudad del destinatario
* CODIGO = Codigo del paquete
* TIPO = Tipo de paquete
* NOMBRE = Nombre del paquete
* DESCRIPCION = Descripción del paquete
* VALR_ FLETE = Valor del flete
4. Video club: In a video store, it is necessary to maintain information about around 3000 cassettes, each one
The tapes are assigned a number for each movie, and it is necessary to know a title and category for
example: comedy, suspense, drama, action, science fiction, etc. Some copies of many are kept
movies. Each movie is given an identification and tracking of what it contains is maintained.
cassettes.
4/9
Database Normalization Exercise Guide
A cassette can come in various formats and a movie is recorded on a single cassette; frequently the
Movies are requested according to a specific actor Tom Cruise and Demi Moore are the most popular.
For this reason, information about the actors belonging to each movie must be maintained.
Not all movies feature famous actors, store customers like to know facts such as the
nombre real del actor, y su fecha de nacimiento.
The store keeps information only about the actors who appear in the movies and who are available.
disposition. Videos are only rented to those who belong to the video club. To belong to the club, you
must have good credit. For each club member, a record is kept with their name, phone number, and
address, each club member is assigned a membership number. It is desired to maintain information
de todos los casetes que un cliente alquila, cuando un cliente alquila un casete se debería conocer el nombre
from the movie, the date it is rented and the return date.
It is requested to apply the normalization rules up to the third normal form, having the following entities.
with their respective attributes:
Where:
5. Given the following relation LOAN_BOOKS (School, teacher, subject/skill, classroom, course,
book, publisher, loan_date) that contains information related to the loans made by the
editorials to primary school teachers for their evaluation in some of the
Subjects/skills they teach. It is requested to apply the rules of normalization and obtain its model.
relational, indicate its keys, main attributes.
5/9
Database Normalization Exercise Guide
Subject/
School Professor Classroom Course Book Editorial Loan date
skill
Learn and
Thought to teach in
C.P Cervantes Juan Pérez 1.A01 1st Grade Grao 09/09/2010
Logical education
infantile
Preschool Techniques
C.P Cervantes Juan Pérez Writing 1.A01 1st Grade 05/05/2010
Rubio,N56 Rubio
Learn and
Thought Teach in
C.P Cervantes Juan Pérez 1.A01 1st Grade Grao 05/05/2010
Numeric education
infantile
Thought
Alicia Spatial, Education Apprentice
C.P Cervantes 1.B01 1st Grade 06/05/2010
García Temporal and Infantil N9 Hall
causal
Learn and
Alicia Thinking teach in
C.P Cervantes 1.B01 1st Grade Grau 06/05/2010
García Numeric education
infantile
Learn and
Andrés to teach in
C.P Cervantes Writing 1.A01 2nd Grade Graó 09/09/2010
Fernandez education
infantile
to know
educate: guide
Andrés Topics of
C.P Cervantes English 1.A01 2nd Grade For Parents 05/05/2010
Fernández Today
y
Teachers
to know
educate: guide
Juan Thought Themes of
C.P Quevedo 2.B01 1st Grade for Parents 18/12/2010
Méndez Logical Today
y
Teachers
Learn and
John Thought to teach in
C.P Quevedo 2.B01 1st Grade Graó 06/05/2010
Mendez Numeric education
childish
6/9
Database Normalization Exercise Guide
Fernandez
Carlos
360247k Raúl Rojas Systems MA123 Mathematics 2 CB-214 V
Arambulo
Victor
360247k Raúl Rojas Systems AU511 Drawing CB-120 U
Moncada
7/9