{"id":110,"date":"2026-03-06T08:41:52","date_gmt":"2026-03-06T08:41:52","guid":{"rendered":"https:\/\/gigz.pk\/sql\/?post_type=lesson&#038;p=110"},"modified":"2026-03-16T18:54:36","modified_gmt":"2026-03-16T18:54:36","slug":"normalization-1nf-2nf-3nf","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/","title":{"rendered":"Normalization (1NF, 2NF, 3NF)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Database normalization is a process used to organize a database into tables and columns to reduce redundancy and improve data integrity. It ensures that data is stored efficiently and updates, insertions, or deletions do not lead to inconsistencies.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. First Normal Form (1NF)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong> A table is in 1NF if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Each column contains only atomic (indivisible) values.<\/li>\n\n\n\n<li>Each record is unique.<\/li>\n\n\n\n<li>There are no repeating groups or arrays.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key Points:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Eliminate duplicate columns from the same table.<\/li>\n\n\n\n<li>Create separate tables for related data.<\/li>\n\n\n\n<li>Identify a primary key for each table.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Before 1NF:<\/strong><br>CustomerID | CustomerName | PhoneNumbers<br>1 | John Doe | 12345, 67890<br>2 | Jane Smith | 54321<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>After 1NF:<\/strong><br>CustomerID | CustomerName | PhoneNumber<br>1 | John Doe | 12345<br>1 | John Doe | 67890<br>2 | Jane Smith | 54321<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. Second Normal Form (2NF)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong> A table is in 2NF if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It is already in 1NF.<\/li>\n\n\n\n<li>All non-key attributes are fully functionally dependent on the primary key.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key Points:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Remove partial dependencies (when a column depends only on part of a composite key).<\/li>\n\n\n\n<li>Create separate tables for attributes that depend on a part of the key.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Before 2NF:<\/strong><br>OrderID | ProductID | ProductName | Quantity<br>101 | 1 | Laptop | 2<br>101 | 2 | Mouse | 5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>After 2NF:<\/strong><br><strong>Orders Table:<\/strong><br>OrderID | ProductID | Quantity<br>101 | 1 | 2<br>101 | 2 | 5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Products Table:<\/strong><br>ProductID | ProductName<br>1 | Laptop<br>2 | Mouse<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. Third Normal Form (3NF)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong> A table is in 3NF if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It is already in 2NF.<\/li>\n\n\n\n<li>All non-key attributes are not transitively dependent on the primary key (i.e., no attribute depends on another non-key attribute).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key Points:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Remove transitive dependencies.<\/li>\n\n\n\n<li>Each non-key attribute must depend only on the primary key.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Before 3NF:<\/strong><br>StudentID | StudentName | CourseID | CourseName | Instructor<br>1 | Alice | C101 | Math | Mr. Smith<br>2 | Bob | C102 | English | Mrs. Johnson<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>After 3NF:<\/strong><br><strong>Students Table:<\/strong><br>StudentID | StudentName<br>1 | Alice<br>2 | Bob<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Courses Table:<\/strong><br>CourseID | CourseName | Instructor<br>C101 | Math | Mr. Smith<br>C102 | English | Mrs. Johnson<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1NF:<\/strong> Eliminate repeating groups, ensure atomic values.<\/li>\n\n\n\n<li><strong>2NF:<\/strong> Remove partial dependencies, ensure all attributes fully depend on the primary key.<\/li>\n\n\n\n<li><strong>3NF:<\/strong> Remove transitive dependencies, ensure attributes depend only on the primary key.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Normalization helps maintain <strong>data consistency<\/strong>, <strong>avoids redundancy<\/strong>, and <strong>simplifies database management<\/strong>.<\/p>\n\n\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/gigz.pk\/sql\/\">Home<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\">Learn Advanced SQL &#038; Database Engineering (SQL-301) > Database Design > Normalization (1NF, 2NF, 3NF)<\/span><\/span><\/div>\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1773598076936\"><strong class=\"schema-faq-question\"><\/strong> <p class=\"schema-faq-answer\"><\/p> <\/div> <\/div>\n","protected":false},"menu_order":55,"template":"","class_list":["post-110","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Normalization (1NF, 2NF, 3NF) - SQL Learning Hub<\/title>\n<meta name=\"description\" content=\"Learn 1NF, 2NF, 3NF in SQL to reduce redundancy, ensure data consistency, and optimize relational database design efficiently.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Normalization (1NF, 2NF, 3NF) - SQL Learning Hub\" \/>\n<meta property=\"og:description\" content=\"Learn 1NF, 2NF, 3NF in SQL to reduce redundancy, ensure data consistency, and optimize relational database design efficiently.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Learning Hub\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-16T18:54:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/normalization-1nf-2nf-3nf\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/normalization-1nf-2nf-3nf\\\/\",\"name\":\"Normalization (1NF, 2NF, 3NF) - SQL Learning Hub\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/#website\"},\"datePublished\":\"2026-03-06T08:41:52+00:00\",\"dateModified\":\"2026-03-16T18:54:36+00:00\",\"description\":\"Learn 1NF, 2NF, 3NF in SQL to reduce redundancy, ensure data consistency, and optimize relational database design efficiently.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/normalization-1nf-2nf-3nf\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/normalization-1nf-2nf-3nf\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/normalization-1nf-2nf-3nf\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn Advanced SQL & Database Engineering (SQL-301) > Database Design > Normalization (1NF, 2NF, 3NF)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/\",\"name\":\"SQL Learning Hub\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Normalization (1NF, 2NF, 3NF) - SQL Learning Hub","description":"Learn 1NF, 2NF, 3NF in SQL to reduce redundancy, ensure data consistency, and optimize relational database design efficiently.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/","og_locale":"en_US","og_type":"article","og_title":"Normalization (1NF, 2NF, 3NF) - SQL Learning Hub","og_description":"Learn 1NF, 2NF, 3NF in SQL to reduce redundancy, ensure data consistency, and optimize relational database design efficiently.","og_url":"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/","og_site_name":"SQL Learning Hub","article_modified_time":"2026-03-16T18:54:36+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["WebPage","FAQPage"],"@id":"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/","url":"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/","name":"Normalization (1NF, 2NF, 3NF) - SQL Learning Hub","isPartOf":{"@id":"https:\/\/gigz.pk\/sql\/#website"},"datePublished":"2026-03-06T08:41:52+00:00","dateModified":"2026-03-16T18:54:36+00:00","description":"Learn 1NF, 2NF, 3NF in SQL to reduce redundancy, ensure data consistency, and optimize relational database design efficiently.","breadcrumb":{"@id":"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/sql\/lesson\/normalization-1nf-2nf-3nf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/sql\/"},{"@type":"ListItem","position":2,"name":"Learn Advanced SQL & Database Engineering (SQL-301) > Database Design > Normalization (1NF, 2NF, 3NF)"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/sql\/#website","url":"https:\/\/gigz.pk\/sql\/","name":"SQL Learning Hub","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/sql\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/lesson\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/media?parent=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}