CodeBlanks Logo Icon CodeBlanks

First normal form

Learn first normal form (1NF).

1NF

1NF requires each cell to hold a single value. Comma-separated lists are forbidden.

-- YANLIŞ: 'Kalem, Defter, Silgi'
-- DOĞRU: her ürün ayrı satırda

1NF wants single values.

1NF — details

1NF requires atomic values. A single cell cannot hold a list or set.

For example, instead of storing "555-1, 555-2" in a phones column, you create a customer_phones table with one row per phone.

Practice 1NF

Bring an orders table to 1NF: each product on its own row.

Starter code

query.sql
-- normalize to 1NF
CREATE TABLE

Sample solution

query.sql
CREATE TABLE order_items (
  order_id INT,
  product VARCHAR(50),
  qty INT
)

Expected output

Tablo oluşturuldu

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 1NF value

Question
1NF: each cell holds an ____ value
Answer
1NF: each cell holds an atomic value

Explanation: An atomic value cannot be split into smaller parts; 1NF requires it.

2 Which value does 1NF forbid?

  • Text
  • Numbers
  • Dates
  • Lists Correct answer

Explanation: 1NF forbids lists in a cell.

3 First normal form: match the terms

Term Meaning
1NF atomic
cell single value
list forbidden
single required

All lessons in Intermediate