13.6
First Normal Form (1NF)
Before discussing First Normal Form, we provide a definition of the state prior to First
Normal Form.
Unnormalized Form (UNF) A table that contains one or more repeating groups.
First Normal A relation in which the intersection of each row and column contains
Form (1NF) one and only one value.
In this chapter, we begin the process of normalization by first transferring the data from
the source (for example, a standard data entry form) into table format with rows and
columns. In this format, the table is in Unnormalized Form and is referred to as an unnormalized
table. To transform the unnormalized table to First Normal Form we identify and
remove repeating groups within the table. A repeating group is an attribute, or group of
attributes, within a table that occurs with multiple values for a single occurrence of the
nominated key attribute(s) for that table. Note that in this context, the term ‘key’ refers to
the attribute(s) that uniquely identify each row within the unnormalized table. There are
two common approaches to removing repeating groups from unnormalized tables:
(1) By entering appropriate data in the empty columns of rows containing the repeating
data. In other words, we fill in the blanks by duplicating the nonrepeating data, where
required. This approach is commonly referred to as ‘flattening’ the table.
(2) By placing the repeating data, along with a copy of the original key attribute(s), in a
separate relation. Sometimes the unnormalized table may contain more than one
repeating group, or repeating groups within repeating groups. In such cases, this
approach is applied repeatedly until no repeating groups remain. A set of relations is
in 1NF if it contains no repeating groups.
For both approaches, the resulting tables are now referred to as 1NF relations containing
atomic (or single) values at the intersection of each row and column. Although both
approaches are correct, approach 1 introduces more redundancy into the original UNF
table as part of the ‘flattening’ process, whereas approach 2 creates two or more relations
with less redundancy than in the original UNF table. In other words, approach 2 moves the
original UNF table further along the normalization process than approach 1. However, no
matter which initial approach is taken, the original UNF table will be normalized into the
same set of 3NF relations.
We demonstrate both approaches in the following worked example using the
DreamHome case study.
13.6
First Normal Form (1NF)
Before discussing First Normal Form, we provide a definition of the state prior to First
Normal Form.
Unnormalized Form (UNF) A table that contains one or more repeating groups.
First Normal A relation in which the intersection of each row and column contains
Form (1NF) one and only one value.
In this chapter, we begin the process of normalization by first transferring the data from
the source (for example, a standard data entry form) into table format with rows and
columns. In this format, the table is in Unnormalized Form and is referred to as an unnormalized
table. To transform the unnormalized table to First Normal Form we identify and
remove repeating groups within the table. A repeating group is an attribute, or group of
attributes, within a table that occurs with multiple values for a single occurrence of the
nominated key attribute(s) for that table. Note that in this context, the term ‘key’ refers to
the attribute(s) that uniquely identify each row within the unnormalized table. There are
two common approaches to removing repeating groups from unnormalized tables:
(1) By entering appropriate data in the empty columns of rows containing the repeating
data. In other words, we fill in the blanks by duplicating the nonrepeating data, where
required. This approach is commonly referred to as ‘flattening’ the table.
(2) By placing the repeating data, along with a copy of the original key attribute(s), in a
separate relation. Sometimes the unnormalized table may contain more than one
repeating group, or repeating groups within repeating groups. In such cases, this
approach is applied repeatedly until no repeating groups remain. A set of relations is
in 1NF if it contains no repeating groups.
For both approaches, the resulting tables are now referred to as 1NF relations containing
atomic (or single) values at the intersection of each row and column. Although both
approaches are correct, approach 1 introduces more redundancy into the original UNF
table as part of the ‘flattening’ process, whereas approach 2 creates two or more relations
with less redundancy than in the original UNF table. In other words, approach 2 moves the
original UNF table further along the normalization process than approach 1. However, no
matter which initial approach is taken, the original UNF table will be normalized into the
same set of 3NF relations.
We demonstrate both approaches in the following worked example using the
DreamHome case study.
การแปล กรุณารอสักครู่..