ArticleslgStudy

science

First normal form

First normal form is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand First normal form rather than just read about it. In short: First normal form (1NF) is the most basic level of database normalization defined by English computer scientist Edgar F. Codd, the inventor of the relational database.

Key takeaways

  • First normal form belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect First normal form to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of First normal form from memory before moving on to harder problems.

Reference excerpt

First normal form (1NF) is the most basic level of database normalization defined by English computer scientist Edgar F. Codd, the inventor of the relational database. A relation (or a table, in SQL) can be said to be in first normal form if each field is atomic, containing a single value rather than a set of values or a nested table. In other words, a relation complies with first normal form if no attribute domain (the set of values allowed in a given column) has relations as elements. Most relational database management systems do not support creating or using table-valued columns, which means most relational databases will be in first normal form by necessity. Otherwise, normalization to 1NF involves eliminating nested relations by breaking them up into separate relations associated with each other using foreign keys. This process is a necessary step when moving data from a non-relational (or NoSQL) database, such as one using a hierarchical or document-oriented model, to a relational database. A database must satisfy 1NF to satisfy further "normal forms", such as 2NF and 3NF, which enable the reduction of redundancy and anomalies. Other benefits of adopting 1NF include the introduction of increased data independence and flexibility (including features like many-to-many relationships) and simplification of the relational algebra and query language necessary to describe operations on the database. Codd considered 1NF mandatory for relational databases, while the other normal forms were merely guidelines for database design.

Background First normal form was introduced in 1970 by Edgar F. Codd in his paper "A relational model of data for large shared data banks", although initially it was simply referred to as "normalization" or "normal form". It was renamed to "first normal form" when Codd introduced additional normal forms in his paper "Further Normalization of the Data Base Relational Model" in 1971. The relational model was proposed as an improvement over hierarchical databases which were prevalent at the time. A key difference lies in how relationships between records are represented. In a hierarchical database, one-to-many relationships are represented through containment: a single record may contain sets of records (known as repeating groups) as attribute values. But Codd argued that hierarchy is not flexible and expressive enough for more complex data models. For example, many-to-many relationships cannot be represented through hierarchy. Thus he suggest eliminating nested records and instead represent relationship through foreign keys. This allows richer relationships to be expressed, since a record can now participate in multiple relationships. A direct translation of a hierarchical database into relations would represent repeating groups as nested relations. Thus normalization is defined as eliminating nested relations and instead represent the one-to-many relationship through foreign keys. Codd distinguishes between "atomic" and "compound" data. Atomic (or "nondecomposable") data includes basic types such as numbers and strings – broadly speaking, it "cannot be decomposed into smaller pieces by the DBMS (excluding certain special functions)". Compound data is made up of structures such as relations (or tables, in SQL) which contain several pieces of atomic data and thus "can be decomposed by the DBMS". In a relation, each attribute (or column) has a set of allowed values known as its domain (e.g., a "Price" attribute's domain may be the set of non-negative numbers with up to 2 fractional digits). Each tuple (or row) in the relation contains one value per attribute, and each must be an element in that attribute's domain. Codd distinguishes attributes which have "simple domains" containing only atomic data from attributes with "nonsimple domains" containing at least some forms of compound data. Nonsimple domains introduce a degree of structural complexity which can be difficult to navigate, to query and to update – for instance, it will be time-consuming to operate across several nested relations (that is, tables containing further tables), which can be found in some non-relational databases. First normal form therefore requires all attribute domains to be simple domains, such that the data in each field is atomic and no relation has relation-valued attributes. Precisely, Codd states that, in the relational model, "values in the domains on which each relation is defined are required to be atomic with respect to the DBMS." Normalization to 1NF is thus a process of eliminating nonsimple domains from all relations.

Examples

Design that violates 1NF This table of customers' credit card transactions does not conform to first normal form, as each customer corresponds to a repeating group of transactions. Such a design can be represented in a hierarchical database, but not in an SQL database, since SQL does not support nested tables.

The evaluation of any query relating to customers' transactions would broadly involve two stages:

unpacking one or more customers' groups of transactions, allowing the individual transactions in a group to be examined, and deriving a query result from the results of the first stage. For example, in order to find out the monetary sum of all transactions that occurred in October 2003 for all customers, the database management system (DMBS) would have to first unpack the Transactions field of each customer, then sum the Amount of each transaction thus obtained where the Date of the transaction falls in October 2003.

Design that complies with 1NF Codd described how a database like this could be made less structurally complex and more flexible by transforming it into a relational database in first normal form. To normalize the table so it complies with first normal form, attributes with nonsimple domains must be extracted to separate, stand-alone relations. Each extracted relation gains a foreign key referencing the primary key of the relation which initially contained it. This process can be applied recursively to nonsimple domains nested in multiple levels (i.e., domains containing tables within tables within tables, and so on). In this example, CustomerID is the primary key of the containing relation and will therefore be appended as a foreign key to the new relation:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with First normal form

Start with the simplest possible case. Write down what First normal form claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to First normal form before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about First normal form ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of First normal form

In research
First normal form appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses First normal form in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
First normal form is common in secondary-school and first-year university syllabi. It links to neighbouring topics Database normalization, so understanding it makes those chapters shorter.
In everyday life
Look for First normal form outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “First normal form” →

How to study First normal form in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what First normal form means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain First normal form out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is First normal form in simple terms?

First normal form (1NF) is the most basic level of database normalization defined by English computer scientist Edgar F. Codd, the inventor of the relational database.

Why does First normal form matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study First normal form?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on First normal form.

Tags

  • Database normalization

Keep exploring