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
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Database Programming.
Lesson complete
Earn the 3 college credits for Database Programming
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Achieving Third Normal Form (3NF): Walkthrough and Examples →← 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 →
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.
Enroll now → Course details Download the syllabus All Computer Science courses Every credit course with PRO →
Why take it here
Why students take Database Programming with UPI Study
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.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →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)?
What does atomic mean in first normal form?
Why are columns like phone1, phone2, and phone3 a bad design?
Why is searching a comma-separated list with LIKE unreliable?
About the Database Programming course
How many college credits is Database Programming?
How much does Database Programming cost and what is included?
Which universities accept UPI Study credits?
How long does Database Programming take?
How are the exams done?
How do my credits reach my college?
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
3 credits · NCCRSEnroll →