Normalization in SQL | Database Normalization Forms - 1NF, 2NF, 3NF, BCNF | Edureka Rewind
Skills:
SQL Analytics90%
Key Takeaways
Explains normalization in SQL using 1NF, 2NF, 3NF, and BCNF forms
Full Transcript
data in the database is stored in terms of enormous quantity retrieving certain data will be a tedious task if the data is not organized correctly with the help of normalization we can organize this data and also reduce the Redundant data hey guys this is prik from edura and I welcome you all to this interesting session on normalization in SQL in this session I'll explain everything that is related to normalization with simple examples that are easy to remember firstly let's look at the agenda for today's session so we're going to start off with understanding normalization and moving further we shall look at various types of normalization and those are first normal form second normal form third normal form and voice card normal form I hope you guys are clear with the agenda but before moving further if you haven't subscribed to our Channel then do subscribe to never miss out an update with that being said let's get started the first Topic in today session is what is normalization database normalization is a technique of organizing the data in the database it is a systematic approach of decomposing tables to eliminate data redundancy it is a multi-step process that puts data into table of form removing the duplicated data from its relational tables on the screen we just saw that the table is getting decomposed into two smaller table is it really necessary to normalize the table that is present on the database well every table in the database has to be in the normal form so normalization is used mainly for two purpose so the first one is it is used to eliminate repeated data having repeated data in the system not only makes the process slow but will cause trouble during the later part of transactions and the second one is to ensure the data dependencies make some logical sense yes usually the data is stored in database with certain logic huge data sets without any purpose are completely wasted it's like having an abundant resource without any application the data that we have should make some logical sense normalization came into existence because of the problems that occurred on data now let's look at those problems and these are known as data anomalies if a table is not properly normalized and has data redundency then it will not not only eat up the extra memory space but will also make it difficult to handle and update the database let's look at the first anomaly that is insertion anomaly suppose for a new position in a company Mr rakshit is selected but the department has not been allotted for him in that case if we want to update his information to the database we need to set the department information as null similarly if we have to insert data of thousand employees who are in similar situation then the department information will be repeated for all those thousand employees this scenario is a classical example of insertion anomalies the next one is update anomaly what if Mr rakit leaves the company or is it no longer the head of the marketing department in that case all the employee records will have to be updated and if by mistake we miss any record it will lead to data inconsistency this is nothing but updation anomaly and the final one is deletion anomaly in our employee table two different pieces of information are kept together that is employee information and Department information hence at the end of financial year if employee records are deleted we will also lose the department information this is nothing but deletion anomaly so these were some of the problems that occurred while managing the data to eliminate all this anomalies normalization came into existence there are many normal forms which are still under development but let's focus on the very basic and the essential ones only so we will be talking about first normal form second normal form third normal form and finally end the session with Bo Cod normal form so without wasting further time let's proceed to First normal form in first normal form we tackle the problem of atomicity here atomicity means values in the table should not be further divided in simple terms a single cell cannot hold multiple values if a table contains a composite or multivalued attributes it violates the first normal form so the following functions will be performed in first normal form the first one is it removes repeating groups from the table and next it creates a separate table for each set of related data and finally it identifies each set of related data with a primary key to understand this in a better way let's look at the given table in the employee table we have employee ID employee name phone number and salary as columns we can clearly see that the phone number column has two values thus it violates the first normal form now if we apply the first normal form to the above table we get the following result in this table each and every row is distinct that is no cell has multiple values the table has achieved atomicity first normal form is simple and can be easily identified in the table we can clearly see there is no multiple values in each and every column thus the first normal form is achieved now let's move to Second normal form second normal form was originally defined by EF cod in 1971 a table is set to be in second normal form only when it fulfills the following condition the first condition is it has to be in first normal form and the second one is the table also should not contain partial dependency here par IAL dependency means the proper subset of a candidate key determines a nonprime attribute so what is a non-prime attribute let's understand this in a simple way attributes that form a candidate key in a table are called Prime attributes and the rest of the attributes of the relation are non Prime for a table Prime attributes can be like employee ID and Department ID and the non-pr attributes can be like office location to understand second normal form let's consider this table this table has a composite primary key that is employee ID and Department ID makes the primary key the non-key attribute is office location in this case office location only depends on Department ID which is only the part of primary key therefore this table does not satisfy the second normal form so what to do in such scenario the answer is simple split the table accordingly to bring this table to Second normal form we need to break the table into two parts which will give the following tables the first table has employee ID and Department ID as columns the second one has Department ID and office location as columns as you can see we have removed the partial functional dependency that we initially had now in the table the column office location is fully dependent on the primary key of that table which is nothing but Department ID I hope you have understood second normal form now that we have learned first normal form and second normal form let's head to the next part of this normalization next topic is third normal form third normal form is a normal form that is used in normalizing the table to reduce a duplication of data and ensure referential Integrity the following condition has to be met by the table to be in third normal form and the first condition is the table has to be in second normal form and the second condition is no non-prime attribute is transitively dependent on any non-prime attribute which depends on other nonprime attributes I know it's a bit confusing so let me make it simple for you it's like if C is dependent on B and in turn B is dependent on a then transitively C is dependent on a this should not happen in third normal form all the non-prime attributes must depend only on the prime attributes so these are the two necessary condition that needs to be attained so why was the normal form designed firstly to eliminate undesirable data anomalies the next one is to reduce the need for restructuring over time finally to make the data model more informative since we have understood the third normal form let's look at the example table in the above table student ID determines subject ID and subject ID determines subject therefore student ID determines subject via subject ID this implies that we have transitive functional dependency and this table does not satisfy the third normal form now in order to achieve third normal form we need to divide the table as shown below firstly let's divide the table and store student ID student name subject ID and address in it all the columns are referring to the primary key which is student ID let the second table have subject ID and subject column so subject is dependent only on subject ID and not on student ID as you can can see from the above table all the non-key attributes are now fully functionally dependent only on the primary key in the first table columns such as student name subject ID and address are only dependent on student ID in the second table subject is only dependent on subject ID with this being understood now we can proceed further to next normal form that is boy Cod normal form this is also known as 3.5 normal form it is the higher version of third normal form form and was developed by Raymond F boys and Edgar fcod to address certain types of anomalies which were not dealt with third normal form before proceeding to boy Cod normal form the table has to satisfy third normal form in boy Cod normal form if every functional dependency that is a implies B then a has to be the Super Key of that particular table so what is a Super Key a Super Key is a group of single or multiple Keys which identifies rows in a table table let's look at the table to clearly understand voice code normal form in the given table one student can enroll for multiple subjects there can be multiple Professor teaching one subject and for each subject a professor is assigned to the student these are the necessary condition of this table in this table all the normal forms are satisfied except voice code normal form why as you can see that student ID and subject form the primary key which means that the subject column is prime attribute but there is one more dependency that is Professor is depending on subject and while subject is a prime attribute Professor is a non-prime attribute which is not allowed by Bo code normal form now in order to satisfy the boys code normal form we will be dividing the table into two parts the table at the top will hold student ID which already exists and we will create a new column that is Professor ID and in the second table which is below we have the columns Professor ID professor and subject columns why do we need to have a new column that is Professor ID by doing this we are removing the non-prime attributes functional dependency in the second table Professor ID will be the Super Key of that table and remaining column will be functionally dependent on it by doing this we are satisfying boys Cod normal form so this brings us to the end of this session I hope you have clearly understood the normalization and its different types if you have any queries or doubts regarding this session please let me know in the comment section and I'll get back to you with an answer thank you guys for watching this video and have a great day e e e e e e e e e e e e e e
Original Description
🔥 𝐄𝐝𝐮𝐫𝐞𝐤𝐚 𝐎𝐧𝐥𝐢𝐧𝐞 𝐌𝐲𝐒𝐐𝐋 𝐃𝐁𝐀 𝐂𝐞𝐫𝐭𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐓𝐫𝐚𝐢𝐧𝐢𝐧𝐠 : https://www.edureka.co/mysql-dba (Use Code "𝐘𝐎𝐔𝐓𝐔𝐁𝐄𝟐𝟎")
This Edureka video on 'What is Normalization' will help you understand the basic concepts of Normalization in SQL and Databases and how it helps in organizing data and data redundancy in SQL with examples.
📢📢 𝐓𝐨𝐩 𝟏𝟎 𝐓𝐫𝐞𝐧𝐝𝐢𝐧𝐠 𝐓𝐞𝐜𝐡𝐧𝐨𝐥𝐨𝐠𝐢𝐞𝐬 𝐭𝐨 𝐋𝐞𝐚𝐫𝐧 𝐢𝐧 𝟐𝟎𝟐𝟒 𝐒𝐞𝐫𝐢𝐞𝐬 📢📢
⏩ NEW Top 10 Technologies To Learn In 2024 - https://www.youtube.com/watch?v=vaLXPv0ewHU
🔴 Subscribe to our channel to get video updates. Hit the subscribe button above: https://goo.gl/6ohpTV
🔴 𝐄𝐝𝐮𝐫𝐞𝐤𝐚 𝐎𝐧𝐥𝐢𝐧𝐞 𝐓𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐚𝐧𝐝 𝐂𝐞𝐫𝐭𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
🔵 DevOps Online Training: http://bit.ly/3VkBRUT
🌕 AWS Online Training: http://bit.ly/3ADYwDY
🔵 React Online Training: http://bit.ly/3Vc4yDw
🌕 Tableau Online Training: http://bit.ly/3guTe6J
🔵 Power BI Online Training: http://bit.ly/3VntjMY
🌕 Selenium Online Training: http://bit.ly/3EVDtis
🔵 PMP Online Training: http://bit.ly/3XugO44
🌕 Salesforce Online Training: http://bit.ly/3OsAXDH
🔵 Cybersecurity Online Training: http://bit.ly/3tXgw8t
🌕 Java Online Training: http://bit.ly/3tRxghg
🔵 Big Data Online Training: http://bit.ly/3EvUqP5
🌕 RPA Online Training: http://bit.ly/3GFHKYB
🔵 Python Online Training: http://bit.ly/3Oubt8M
🌕 Azure Online Training: http://bit.ly/3i4P85F
🔵 GCP Online Training: http://bit.ly/3VkCzS3
🌕 Microservices Online Training: http://bit.ly/3gxYqqv
🔵 Data Science Online Training: http://bit.ly/3V3nLrc
🌕 CEHv12 Online Training: http://bit.ly/3Vhq8Hj
🔵 Angular Online Training: http://bit.ly/3EYcCTe
🔴 𝐄𝐝𝐮𝐫𝐞𝐤𝐚 𝐑𝐨𝐥𝐞-𝐁𝐚𝐬𝐞𝐝 𝐂𝐨𝐮𝐫𝐬𝐞𝐬
🔵 DevOps Engineer Masters Program: http://bit.ly/3Oud9PC
🌕 Cloud Architect Masters Program: http://bit.ly/3OvueZy
🔵 Data Scientist Masters Program: http://bit.ly/3tUAOiT
🌕 Big Data Architect Masters Program: http://bit.ly/3tTWT0V
🔵 Machi
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from edureka! · edureka! · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
ChatGPT Not Working - 4 Fixes | How To Fix ChatGPT Not Working | Why Is ChatGPT Not Working |Edureka
edureka!
Advanced Java script Tutorial | JavaScript Training | JavaScript Programming | Edureka Rewind
edureka!
Java script interview question and answers | Java script training | Edureka Rewind
edureka!
OpenAI API Tutorial using Python | How to use OpenAI GPT-3 API - Ada Babbage Curie Davinci | Edureka
edureka!
What is Unsupervised Learning ? | Unsupervised Learning Algorithms| Machine Learning | Edureka
edureka!
Top 10 Applications of Machine Learning in 2023 | Machine Learning Training | Edureka Rewind - 7
edureka!
Machine Learning Engineer Career Path in 2023 | Machine Learning Tutorial | Edureka Rewind - 6
edureka!
10 Must Have Machine Learning Engineer Skills That Will Get You Hired | Edureka Rewind - 7
edureka!
Data Structures in Python | Data Structures and Algorithms in Python | Edureka | Python Live - 5
edureka!
Python Lists | List in Python | Python Training | Edureka Rewind
edureka!
Predictive Analysis Using Python | Learn to Build Predictive Models | Python Training | Edureka
edureka!
Machine Learning Tutorial | Machine Learning Algorithm | Machine Learning Engineer Program | Edureka
edureka!
How to use Pandas in Python | Python Pandas Tutorial | Python Tutorial | Edureka Rewind
edureka!
Parameters in Tableau | Tableau Parameters Examples | Tableau Tutorial | Edureka Rewind
edureka!
Top 10 Reasons to Learn Tableau in 2023 | Tableau Certification | Tableau | Edureka Rewind
edureka!
Tableau Developer Roles & Responsibilities | Become A Tableau Developer | Tableau | Edureka Rewind
edureka!
Deep Learning With Python | Deep Learning Tutorial For Beginners | Edureka Rewind
edureka!
Realtime Object Detection | Object Detection with TensorFlow | Edureka | Deep Learning Rewind - 2
edureka!
Top 20 Tableau Tips and Tricks in 20 Minutes | Tableau Tutorial | Tableau Training | Edureka Rewind
edureka!
Climate Change Prediction using Time Series | Python Projects | Edureka | DS Rewind - 5
edureka!
ReactJS Installation Tutorial | ReactJS Installation On Windows | ReactJS Tutorial | Edureka Rewind
edureka!
Phases in Cybersecurity | Cybersecurity Training | Edureka | Cybersecurity Rewind - 2
edureka!
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka Rewind
edureka!
Cybersecurity Frameworks Tutorial | Cybersecurity Training | Edureka | Cybersecurity Rewind- 2
edureka!
React vs Angular 4 | Angular 2 vs React | React & Angular | ReactJS Training | Edureka Rewind - 5
edureka!
ReactJS Components Life-Cycle Tutorial | React Tutorial for Beginners | Edureka Rewind
edureka!
Ethical Hacking using Kali Linux | Ethical Hacking Tutorial | Edureka | Cybersecurity Rewind - 3
edureka!
Types Of Artificial Intelligence | Artificial Intelligence Explained | What is AI? | Edureka
edureka!
Top 10 Applications Of Artificial Intelligence in 2023 | Artificial Intelligence| Edureka Rewind
edureka!
The Future of AI | How will Artificial Intelligence Change the World in 2023? | Edureka Rewind
edureka!
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginners | Edureka Rewind
edureka!
Google Cloud IAM | Identity & Access Management on GCP | Edureka | GCP Rewind - 5
edureka!
Google Cloud AI Platform Tutorial | Google Cloud AI Platform | GCP Training | Edureka Rewind
edureka!
Projects in Google Cloud Platform | GCP Project Structure | GCP Training | Edureka Rewind
edureka!
How to Become a Data Scientist | Data Scientist Skills | Data Science Training | Edureka Rewind - 3
edureka!
Agglomerative and Divisive Hierarchical Clustering Explained | Data Science Training | Edureka Live
edureka!
Climate Change Prediction using Time Series | Python Projects | Edureka | DS Rewind - 5
edureka!
Data Science Project - Covid-19 Data Analysis | Python Training | Edureka | DS Rewind - 6
edureka!
What is Honeycode? | Introduction to Honeycode | Edureka
edureka!
Difference between Amazon AWS and Google Cloud | GCP Training Google Cloud | Edureka Live
edureka!
DevOps Lifecycle | Introduction To DevOps | DevOps Tools | What is DevOps? | Edureka Rewind
edureka!
Introduction to DevOps | DevOps Tutorial for Beginners | DevOps Tools | DevOps | Edureka Rewind
edureka!
How to Create Login System using Python | Python Programming Tutorial | Edureka Rewind
edureka!
Python Developer | How to become Python Developer | Python Tutorial | Edureka Rewind
edureka!
How to become a Data Engineer | Complete Roadmap to become a Data Engineer| Data Engineer | Edureka
edureka!
Azure Data Engineer Certification [DP 203] | How to Become Azure Data Engineer [2023] | Edureka
edureka!
Data Analyst vs Data Engineer vs Data Scientist | Data Analytics Masters Program | Edureka Rewind
edureka!
DevOps Engineer day-to-day Activities | DevOps Engineer Responsibilities | Edureka Rewind
edureka!
How to Become a DevOps Engineer? | DevOps Engineer Roadmap | Edureka | DevOps Rewind
edureka!
How to Become a Data Engineer? | Data Engineering Training | Edureka
edureka!
How To Become A Big Data Engineer? | Big Data Engineer Roadmap | Edureka Rewind
edureka!
Python Integration for Power BI and Predictive Analytics | Power BI Training | Edureka
edureka!
Power BI KPI Indicators Tutorial | Custom Visuals In Power BI | Power BI Training | Edureka Rewind
edureka!
Apache HBase Tutorial For Beginners | What is Apache HBase? | Big Data Training | Edureka Rewind
edureka!
Big Data Hadoop Tutorial For Beginners | Hadoop Training | Big Data Tutorial | Edureka Rewind
edureka!
Big Data Analytics | Big Data Analytics Use-Cases | Big Data Tutorial | Edureka Rewind
edureka!
What Is Power BI? | Introduction To Microsoft Power BI | Power BI Training | Edureka Rewind
edureka!
Triggers in Salesforce | Salesforce Apex Triggers | Salesforce Tutorial | Edureka Rewind
edureka!
How To Become A Salesforce Developer | Salesforce For Beginners| Salesforce Training Edureka Rewind
edureka!
Java ArrayList Tutorial | Java ArrayList Examples | Java Tutorial | Edureka Rewind
edureka!
More on: SQL Analytics
View skill →Related Reads
📰
📰
📰
📰
Raincloud Plots with PtitPrince: See What Your Data Is Really Doing
Medium · Python
Confused Between Data Science, Data Analytics, Cloud Computing, DevOps, Data Engineering, and Generative AI? Here's How to Choose the Right Career
Dev.to AI
Data Science with AI — Join IDSA Janakpuri Today
Medium · Data Science
Data Science with AI — Enroll Now at Lonestar Academy Janakpuri
Medium · Data Science
🎓
Tutor Explanation
DeepCamp AI