Professional Documents
Culture Documents
First Normal Form: First Normal Form (1NF) Is A Property of A Relation in A Relational Database. A
First Normal Form: First Normal Form (1NF) Is A Property of A Relation in A Relational Database. A
First Normal Form: First Normal Form (1NF) Is A Property of A Relation in A Relational Database. A
Contents
1 Examples
1.1 Domains and values
1.2 A design that complies with 1NF
1.3 A design that also complies with higher normal forms
2 Atomicity
3 1NF tables as representations of relations
4 References
5 Further reading
Examples
The following scenario illustrates how a database design might violate first normal
form.[3][4]
Here is a table that records the names and telephone numbers of customers:
Customer
Customer ID First Name Surname Telephone Number
123 Robert Ingram 555-861-2025
456 Jane Wright 555-403-1659
789 Maria Fernandez 555-808-9633
Customer
Customer ID First Name Surname Telephone Number
123 Robert Ingram 555-861-2025
555-403-1659
456 Jane Wright
555-776-4100
789 Maria Fernandez 555-808-9633
In the first normal form, the previous table can be represented in the following
way.
Customer
Customer ID First Name Surname Telephone Number
123 Robert Ingram 555-861-2025
456 Jane Wright 555-403-1659
456 Jane Wright 555-776-4100
789 Maria Fernandez 555-808-9633
However, if we assume that two customers can in principle have the same name
(although there are no such in the current table), this database design does not
meet the more stringent requirements of third normal form and possibly not even
second normal form.[5]
Another design for the same data makes use of two tables: a Customer Name table
and a Customer Telephone Number table.
Atomicity
Edgar F. Codd's definition of 1NF makes reference to the concept of 'atomicity'.
Codd states that the "values in the domains on which each relation is defined are
required to be atomic with respect to the DBMS."[6] Codd defines an atomic value
as one that "cannot be decomposed into smaller pieces by the DBMS (excluding
certain special functions)"[7] meaning a field should not be divided into parts with
more than one kind of data in it such that what one part means to the DBMS
depends on another part of the same field.
Hugh Darwen and Chris Date have suggested that Codd's concept of an "atomic
value" is ambiguous, and that this ambiguity has led to widespread confusion
about how 1NF should be understood.[8][9] In particular, the notion of a "value
that cannot be decomposed" is problematic, as it would seem to imply that few, if
any, data types are atomic:
Date suggests that "the notion of atomicity has no absolute meaning":[10] a value
may be considered atomic for some purposes, but may be considered an
assemblage of more basic elements for other purposes. If this position is accepted,
1NF cannot be defined with reference to atomicity. Columns of any conceivable
data type (from string types and numeric types to array types and table types) are
then acceptable in a 1NF table—although perhaps not always desirable; for
example, it would be more desirable to separate a Customer Name field into two
separate fields as First Name, Surname.
Violation of any of these conditions would mean that the table is not strictly
relational, and therefore that it is not in first normal form.
Examples of tables (or views) that would not meet this definition of first normal
form are:
A table that lacks a unique key. Such a table would be able to accommodate
duplicate rows, in violation of condition 3.
A view whose definition mandates that results be returned in a particular
order, so that the row-ordering is an intrinsic and meaningful aspect of the
view.[13] This violates condition 1. The tuples in true relations are not ordered
with respect to each other.
A table with at least one nullable attribute. A nullable attribute would be in
violation of condition 4, which requires every field to contain exactly one
value from its column's domain. It should be noted, however, that this aspect
of condition 4 is controversial. It marks an important departure from Codd's
later vision of the relational model,[14] which made explicit provision for
nulls.[15]