Breaking Down First Normal Form (1NF) with Examples, Explained

UPI Study › Courses › Database Programming › Free lessons › Lesson 2.3 Free with a free account

Breaking Down First Normal Form (1NF) with Examples

Database Programming · Chapter 2: Normalization and Data IntegritySection 2.3 · lesson 10 of 768 min · free with a free account

← Understanding Normal Forms: Types and Worked ExamplesNext lesson: Achieving Third Normal Form (3NF): Walkthrough and Examples →

A free account plays all of Chapter 1 and 3 more lessons of Database Programming. Create a free account →

Earn 3 college credits for Database ProgrammingRecommended for credit by NCCRS · Computer Science 381 · self-paced · one payment, lifetime access

In this lesson

Replace lists and numbered columns with atomic values and related rows.

  • State the first normal form rule for cells, columns, repeating groups, and keys
  • Decide what counts as atomic based on the queries a design must support
  • Replace numbered columns and comma-separated lists with related rows
  • Choose a composite key that matches the business rule for each new row

Free study notes

Get this lesson's notes by email

The key points and 4 practice questions with answers, in your inbox. One email, free.

One email. Unsubscribe in one click.

Transcript

Everything said in the video, section by section (1,015 words). Read along, or search it.

Opening Problem

Two Products in One Text Field

An order arrives at Lantern Books with two products squeezed into one text field. Can we reliably ask how many notebooks it contains? This is a disposable import example, using fictional shop data. One cell mixes a list of products with their quantities. A database can store that text successfully. Successful storage does not mean the table has a useful relational design. First normal form turns the hidden structure into explicit values, rows, and keys.

The Rule

One Domain Value per Cell

First normal form means one value from the intended domain per cell, with repeating groups removed and rows identifiable. A column should have one meaning throughout. A contact field that sometimes means phone and sometimes email mixes different domains. A key identifies rows, while row position does not. Moving a row on screen must not change its identity. We will inspect the cells, remove repetition, and check the result, rather than merely renaming a few columns.

Atomic Values

Atomic Depends on the Design

Atomic means treated as one value for this design. If we filter by city, city deserves a separate field from the full mailing label. Asha Verma becomes first and last name when those parts support our queries. That is a modeling choice, not a rule about counting spaces. A date can remain one date value, even though we can extract year and month. Phone numbers should be text, preserving formatting and leading zeros. Run the separate-field example, selecting last name, city, and postal code. Each requested fact now has its own place. The result returns Verma, Pune, and the postal code independently. We did not have to cut pieces from a mailing label.

Repeating Groups

Phone One, Two, and Three

Numbered columns create a repeating group. Phone one, phone two, and phone three all mean the same kind of fact. They impose a fixed capacity, leave unused slots, and force searches to inspect several places for one number. A fourth number should mean inserting a row, rather than altering the table. Turning a list sideways does not solve its structure. Use a related phone relation, carrying the customer identifier and one phone value per row. We will check its key shortly.

Substring Trap

Searching Inside a Skills List

A list also changes what a search means. Here, a separate staff-skills sandbox stores several skills in each text cell. The where condition asks whether the text contains the sequel abbreviation anywhere. It does not test membership in a well-defined skill set. Leo's NoSQL text includes that abbreviation. Amina's SQL text also includes it, despite the skills being different. Run this substring search, and inspect the names it returns. The database follows the condition we actually wrote. Both Amina and Leo appear. Matching a fragment of text is different from matching one skill value.

Exact Matching

One Skill per Row

Store one skill per row, and the question becomes an equality test. Select person where skill equals the quoted sequel value. The composite key prevents the same person-skill pair from appearing twice. Adding or removing a skill changes one row. Counting skills can now count rows. Preventing misspellings still needs a controlled vocabulary or another validation rule; first normal form alone cannot recognize a typo. Run the exact-match version, using the same fictional people and skill assignments. The separate values make the intended condition direct. Only Amina appears. Leo's NoSQL value is a different complete skill, so it does not satisfy equality.

Flattening Items

One Row per Ordered Product

Repairing the import starts by spotting two issues: items contains a list, and each item bundles product identity with quantity. Separate names only because our shop needs their parts. Separate each product identifier from its quantity, then create one row per item. Order identifier now repeats, so it cannot identify a line alone. Our one-line-per-product rule makes order and product together the composite key. Run the first-normal-form result for order five thousand one. The two products retain their separate quantities and their common order link. Two rows appear, for products eleven and fifteen. Repeated customer details remain, so reaching first normal form has not completed normalization.

Header and Items

Reconnecting Items to Their Order

Another valid first-normal-form repair separates the order header from its items. This disposable subset keeps one customer identifier on the order. Each item row retains order identifier as a foreign key, which links it back to the header. Both parts of its primary key remain required. Foreign key checking is enabled explicitly for this SQLite connection. The matching condition connects each item to exactly its order header. Run the reconstruction query, selecting product, quantity, and customer identifier. Read join as combining rows whose order identifiers match. Both products still belong to customer one, with quantities unchanged. Separating the values has preserved the relationships we started with.

Quick Check

Two Phones for One Customer

A new customer-phone design uses customer identifier and phone together as its primary key. The displayed inserts give one customer two different numbers. Will the final query return no rows, both phone rows, or just the last phone row? The key definition is part of the question. Pause, and predict the result before we run this separate phone example. Both distinct phone rows survive. Customer identifier repeats, but the complete customer-phone pairs differ, so the composite key permits them. Run the file to test that reasoning, and watch the ordered result. The two phone strings have independent rows. Both numbers appear beside customer one. Keeping only the final row would require an overwrite operation, which this program never requests.

First Normal Form Audit

Cells, Groups, Meaning, and Keys

Check whether every cell holds one domain value. Then ask whether repeating groups are absent, rather than whether they exist. Check that every column means the same thing in every row. Identify the key, and make sure row order carries no hidden meaning. A single failure needs repair. Lists become related rows; mixed facts become separate fields, while identifiers preserve the connections. Our import is now queryable without comma counting. Additional normal forms address the repeated descriptive facts that first normal form still allows.

Key Takeaways

Make Hidden Structure Explicit

Atomicity follows the modeled domain. Dates can remain whole, while separately queried name or address parts deserve separate fields. Replace lists and numbered slots with one related row per value. Keep identifiers so the new rows remain connected. Check the composite key against the business rule. First normal form makes individual facts accessible; further dependency tests remove remaining redundancy.

About Database Programming at UPI Study

Database Programming (Computer Science 381) is a self-paced online course of 76 video lessons in 12 chapters, from database applications, SQL setup, schema planning and normalization to keys and constraints, data types, filtering and sorting, joins, subqueries, views, indexes, ROLLUP and PIVOT, regular expressions and database security. It carries a NCCRS credit recommendation for 3 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Compare: Database Fundamentals vs Database Programming

Why take it here

Why students take Database Programming with UPI Study

Write the SQL behind every appDatabase Programming teaches SQL in MySQL and SQL Server side by side: designing and normalizing tables, keys and constraints, data types, inserting, updating and deleting rows, filtering, grouping, joins, subqueries, views, indexes, transactions, and protecting data from SQL injection. It suits computer science and information technology degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Database Programming carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About Breaking Down First Normal Form (1NF) with Examples

What is first normal form (1NF)?
First normal form requires each cell to hold one value from the column's intended domain, with repeating groups removed and rows identified by a key rather than by their position. A cell listing two products with their quantities breaks the rule, and so do numbered columns such as phone1 and phone2. Repair the table by giving each value its own row or field while keeping identifiers that connect the new rows.
What does atomic mean in first normal form?
Atomic means a value is treated as one indivisible value for the design, based on the questions the database must answer. If queries filter by city, city deserves its own field instead of living inside a full mailing label. A date can stay one value even though its year can be extracted. Splitting a name into first and last parts is a modeling choice, not a rule about counting spaces.
Why are columns like phone1, phone2, and phone3 a bad design?
Numbered columns form a repeating group, meaning several columns store the same kind of fact. They fix the capacity at three numbers, leave unused slots, and force a search to check several columns for one number. A fourth number would require altering the table. A related table with the customer identifier and one phone number per row fixes this, and a key on that pair blocks exact duplicates.
Why is searching a comma-separated list with LIKE unreliable?
A LIKE pattern with wildcards matches a fragment of text rather than one complete list item, so it can return rows that do not hold the intended value. Searching a skills column with LIKE '%SQL%' matches a person whose list says NoSQL as well as one who lists SQL. Storing one skill per row turns the question into an exact test such as WHERE skill = 'SQL', and counting skills becomes counting rows.

About the Database Programming course

How many college credits is Database Programming?
Database Programming (Computer Science 381) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Database Programming cost and what is included?
$250, paid once, with lifetime access: all 76 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Database Programming take?
It is self-paced with no deadlines. The 76 lessons total about 11 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 3 credits in Database Programming.

76 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Updated

Database Programming
3 credits · NCCRS
Enroll →