Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
An easy-to-follow database normalization tutorial, with lots of examples and a focus on the design process. Explains the "why" and "how" of normalization, and takes you step-by-step through:
- First Normal Form (1NF)
- Second Normal Form (2NF)
- Third Normal Form (3NF), with a side note on Boyce-Codd Normal Form (BCNF)
- Fourth Normal Form (4NF)
- Fifth Normal Form (5NF)
0:00 What is database normalization?
3:55 First Normal Form (1NF)
10:24 Second Normal Form (2NF)
16:08 Third Normal Form (3NF)
20:29 Fourth Normal Form (4NF)
23:47 Fifth Normal Form (5NF)
26:41 Summary and review
Corrections can be found in the pinned comment.
Пікірлер: 1 000
CORRECTIONS: Expand this comment to see corrections. CONTENTS 0:00 What is database normalization? 3:55 First Normal Form (1NF) 10:24 Second Normal Form (2NF) 16:08 Third Normal Form (3NF) 20:29 Fourth Normal Form (4NF) 23:47 Fifth Normal Form (5NF) 26:41 Summary and review *** CORRECTIONS *** In the Fourth Normal Form (4NF) section, at 23:27 the primary key for the Model_Colors_Available table should appear as {Model, Color}; the primary key for the Model_Styles_Available table should appear as {Model, Style}. Also, the video's informal definition of 4NF - which states that multivalued dependencies on a non-key aren't allowed - is a little too simplistic. I should have said that what's forbidden are "non-trivial" multivalued dependencies on a non-key. "Trivial" multivalued dependencies on a non-key - like Model ->> Color in the case of the Model_Colors_Available table - are fine! A multivalued dependency is considered trivial if the attribute(s) on the left side of the arrow (in this case, Model) and the attribute(s) on the right side of the arrow (in this case, Color) together make up all the attributes in the table. In the First Normal Form (1NF) section, at 4:42, since the column heading in the query results is Beatle, the query itself should have been shown as selecting Beatle. (The query is erroneously shown as selecting "Member_Name".) In the Fifth Normal Form (5NF) section, the summary at 26:16 says that a table (call it T) violates 5NF if it can be "logically thought of as being the result of joining some other tables together." I should have clarified that it if those "other tables" all have the same key as the table T, then it doesn't count as a violation! For example, the fact that a table with columns ( Product_ID (PK), Product_Name ) joins to a table with columns ( Product_ID (PK), Product_Color ) to yield a table PRODUCT which has columns ( Product_ID (PK), Product_Name, Product_Color ) doesn't mean that PRODUCT violates 5NF. More generally, I now think there was a little too much looseness in my presentation of 5NF; I'll do a standalone 5NF video at some point that describes 5NF in a less question-begging way. The same goes for 4NF!
@ScorpioHR
Жыл бұрын
4:42 You're selecting "Member_Name" column, but in the result drawing the column name is "Beatle".
@decomplexify
Жыл бұрын
@@ScorpioHR You're the first person who's noticed that! Thanks, I'll include a correction in the pinned comment.
@thomasst.martin2522
Жыл бұрын
How come you didn’t include Boyce-Codd between 3rd and 4th?
@decomplexify
Жыл бұрын
@@thomasst.martin2522 Hi, I talked about it at 19:11 and 27:40. Also I did an entire video on Boyce-Codd Normal Form: kzread.info/dash/bejne/iIuirbeEeJfafMo.html
@ayporos
Жыл бұрын
I agree that going up to 5th normal form is a good decision. 6NF is just bonkers and aside from very specific use cases can be ignored. Btw, does the following fall under 5NF or not?: Your skill rating value for players went from 1 to 9, but any type of numeric field used would allow for either less or more distinct values to be entered. '1 to 9' is a data set as well, and should have been captured in a separate table Skill_Levels. Does that step fall under 5NF? I feel it does. It's data, it should be in a table, not 'hard baked' into code.
this is the clearest explanation about database normalization so far. You have my gratitude
@austineverett2384
Жыл бұрын
This guys is great, I wish he had more videos
@ThunderAppeal
Жыл бұрын
If you needed a stupid video on yutube to explain a complex topic you were an idiot to start and nothing will help you.
@kolynzb
11 ай бұрын
😮this guys explanation is amazing
@haicheurzakaria5916
Ай бұрын
bro did a resume of more then 3 years of me studying databases xD university programs are trash fr
Sometimes I hear explanations such as this and wonder how other people have such a difficult time expressing the same idea. Yours is so concise and well broken down, avoiding convoluted terms and making good use of analogies. Thank you Decomplexify.
@decomplexify
Жыл бұрын
Thanks, I appreciate that. I was doing everything I could to make it simple! Because it is simple (even if it often gets taught in a way that obscures the simplicity).
@MrAbhithepandey
Жыл бұрын
@@decomplexify This is an excellent video. Thanks.
@WolfrostWasTaken
10 ай бұрын
It's usually because the people explaining it didn't properly learn it themselves. The example used in this video ergonomically follows you on internalizing concepts that are purely theoretical. This is why I love practice so much.
@wirotep.1210
9 ай бұрын
Totally agreed!
@timMathsHelp
8 ай бұрын
hard to call the video concise when he brings up atleast 1381938 different analogies throught the video
I’ve been building databases for over 20 years and this is one of the simplest and clearest explanations I’ve ever seen.
@Hubertoom
5 ай бұрын
Why did you watch this if you have been working for 20 years with DB? 😄
@adamesd3699
5 ай бұрын
@@HubertoomIt’s even worse than that. I’m re-enjoying cartoons I last watched as a child. 🤓
@Hubertoom
5 ай бұрын
@@adamesd3699 I think we misunderstood. It is fine, but my point was that after 20 years of experience, this kind of knowledge looks quite straightforward 🤠
@siimkask14
3 ай бұрын
@@Hubertoomits because hes lying
@DrCaesarsPalace_MD
3 ай бұрын
@@siimkask14 don't need that negativity son. Maybe they were trying to find good ways to explain the concept, used to working to 3NF but not 5NF, who knows. Not everyone is out to get you mate.
A lot of these normalisation forms once you've learnt them just seem so natural that it's hard to imagine not doing them.
@pedrolopez8057
Жыл бұрын
After working with databases for a short period time and looking at some running examples I was at least at the 4th NF level. After I explored the topic 5th NF now seems natural. I often wonder why people struggle with the idea of data independence.
@imblackmagic1209
Жыл бұрын
i didn't even know these concepts existed, and somehow my DB designs were at least 3NF... i don't understand why people don't sit down to think about the use cases of their designs, or try them with dummy data
@adityanair5527
Жыл бұрын
@@Mr0rris0 what is blud talking bout
@AlbertoSimeoni-wi9wj
7 ай бұрын
And in modern erp normal forms are not even take into account.... Columnar + in memory + compressed...to exploit performances they are less than 3nf
@fabio.1
5 ай бұрын
@@AlbertoSimeoni-wi9wj👀🤔
You summarized 2 whole days worth of lectures into 20 mins, thank you!!!
I've used SQL databases for longer than a quarter century. Even longer ago, I studied this as part of my CS education. I saw this video in my stream just now, and thought I'd refresh myself. I was very pleased as it confirmed what I've been doing in my professional career. I guess something stuck deep inside my neurons so many years ago! Excellent video, very well explained with very good examples! Great work!
@decomplexify
Жыл бұрын
Thank you, I appreciate that!
@javabeanz8549
Жыл бұрын
I took some courses that long ago, but have really only been working with SQL for 16 years. And yes, I have apparently learned it well, as I key everything, to link across tables. Like Joe is Person ID 7, I can add Person ID 7 to records in other tables that I want associated with Joe. Join on key Person ID to match them up.
@MartinHusak
3 ай бұрын
Have the same experience. I was taught this at Uni long time ago. I though I forgot it but still intuitivelly respecting up to 4thNF all principles. Sometimes even 5th. Great video. Thank you.
Stuff I’ve known for years, but never explained so concisely - kudos to you great work 👌
What a gem you are!! 5 normalization rules in under 30 minutes, so clearly. Just WoW! Thanks a lot for making me understand all of it. You deserve 2.24million subscribers not 22.4K.
Working with DBs 25 years (since SQL6.5). This is one of the most complete and clear explanation I have seen
One of the more clear normalization explanations here! Good job!
Nice work Decomplexify! Easy and clear, one of the best explanations that I have ever watched.
its honestly criminal that you dont have more subs. i wish I could find a video this well done on every topic I struggle with
By far the best explanation on Normalization I have been able to find! Keep up the great work!!
I had to read a chapter on normalizations for my database class and I was just lost with the usage of its jargons. This video helped it alot! Simple and thorough.
This has been hugely helpful! I was completely lost with Normalization but not anymore. Thank you
That's without a doubt the clearest explanation I ever heard about database normalisation forms. Your videos are incredibly good. TY
Thank you! You obviously have a knack for explaining things. The animation is really nice and helps with the subject. Can't wait for more.
This was immensely useful as the rigorous, mathematical explanation given to me in university wasn't clear enough. Thank you! You've got a new subscriber, and I hope I get to enjoy your future content :)
I don't know how many books and articles I've read that don't explain this, but you did. Keep up the good work!
Wow. Of all the videos about database relationships in youtube. Yours is the only one that is complete in details. Thank you.
Someone give this guy a teacher's award - One of the best breakdowns of a difficult subject I have seen
Though not part of the normal forms, I would also add don't use something that might change as a primary key, such as player name if players are allowed to change their names. Then you have to update all the tables keyed by that player. Better to invent a player ID number, use that as key and store the (name,id) pairs in a table.
This has been by far the most clear, concise & practical explanation. Thanks!
This is a gem. Please make uploads more consistently. Thank you.
You're great, keep up doing the amazing stuff. You'll be getting what you deserve ultimately.
Subscribed! I'm currently studying this subject because I've an exam in 2 days but, I've decided that I will continue watching your videos. The way you explain things is out of the ordinary. Thank you!
Definitely the best explanation ive seen for these normal forms!!! I learned this in school and after a while I forget the rules, I just know whats needed in a table. I'm glad to take this refresher and take note of them. I find after designing many tables, these rules tend to happen organically because if not you run into too many problems.
I was having a really hard time with this concept and this video made it all click. Thank you so much. Looking forward to your content going forward
There does not exist a better video that explains normalization with such clarity and simplicity.
This is EXCELLENT! So easy understand without unnecessary mathematical rigor for us mortals ;-). Thank you Mr. Decomplexify for those awesome explanations.
You're a wonderful instructor, and there are many leaners in the the world who need you..Thank-you
The best explanation available. Normalization is so easy after watching this video, and it all makes sense. Thank you so much!
Concise, well illustrated, yet densely well organized video structure. 10/10 Thank you will repost!
Excellent presentation of normalized forms. Given so much noSQL databases these days, it's nice to be reminded of data safety concerns...
Seriously, I can't thank you enough for this, the database course in my university made this look like a convoluted mess and you just explain it so simply like that
The best explanation of DB normalization that I was able to find on KZread. Thanks a lot man!
I remember learning this on a Systems Analysis course in 1985. Inefficient databases could have a real impact on performance whereas today poor database design can be masked by more powerful hardware.
@javabeanz8549
Жыл бұрын
Were you working with dBase then? I remember dBase II and dBase III being taught around that time.
I've done the LinkedIn Learning videos my university provided, nothing. I've powered through the reading materials left and right, still nothing. I've tried other KZread videos, and surprise, still nothing. Your video somehow makes it make sense. I've been struggling with these concepts for 2 weeks now. Thank you for putting it in basic terms!
@decomplexify
2 жыл бұрын
I'm so glad my video helped you. When I made the video I was very conscious of wanting to make the explanations as simple as they could possibly be, so that anybody could understand them, so I tried very hard to do just that. For me that's what all teaching should strive for. It's really gratifying to read that the video has succeeded in giving you a good understanding of these concepts.
Where was this explanation when i needed it in school! This is a really awesome description and it is timeless
I really wish I were as eloquent as the creator of this brilliant video. Literally none of my questions pertaining to the subject are left unanswered. Thank you!
This is awesome. Much appreciated 🙏 Edit: would love to see a similar decomplexify centred on the models used in reports created via data analytics? How to approach creating the optimum data set in terms of structure, such as a star model versus other options whose names I haven't yet looked up 😊
This is a great video! I think that a video on different keys and what they are would be really helpful as well!
@decomplexify
2 жыл бұрын
Thanks! I've been working on a keys video so stay tuned for that...
Absolutely loved this video. Learned a lot about normalization, but also communication and teaching. Thank you.
perfect pacing, no bloat. Highly appreciated; intro's and padding are the bane of self learners through youtube
Seriously the best video explanation. Other youtube videos only cover a few cases. Or don't explain each normalization clearly. Great videos. I subscribed. I am a front-end dev expanding my skillset to more full stack. Databases are my weakest area. Really appreciate the in depth well thought out content!
@tenthlegionstudios1343
Жыл бұрын
Topics I am interested in: Underlying mechanisms behind database data storage (B+ trees, LSM SSTables Bloom Filters, compaction, write ahead logs, error recovery, etc...), data modeling in noSQL DBs (Is there anything like normalization / best practices for GraphDBs, blob storage, etc... ), denormalization and examples, data processing pipeline, and when to chose each database type for a project. General DB knowledge is always appreciated as well. If you are looking for video ideas outside of the DB world, then I have been interested in pattern matching algorithms and data structures like aho-corasick automaton, Suffix trees with linear time construction (specifically the construction in linear time). Thanks!
@decomplexify
Жыл бұрын
@@tenthlegionstudios1343 Thanks, I really appreciate the comment, and out of the various topics you've mentioned, the one I'm most qualified to talk about is "denormalization and examples" - this is something I've been meaning to do a video about for some time. Stay tuned!
So clear explanation. Well done. I read this long time in university, but I have long since forgot the definitions. Thankfully I have always ended up fully normalized 3NF designs since it makes intuitive sense. Having met non-normalized designs at work, the pain those caused were enormous and stalled the development (eventually bankrupting the company)… FUBAR, it was.
This video is so great. I am a relatively new business analyst and have been struggling with a non-normalized legacy database that has been causing a lot of headache at my job. Can't wait to get in there and get it fixed up after watching this! Thank you Decomplexify
Seriously the best explanation ever ! Thanks a lot Sir. 😍
Well done mate! Your explanations were absolutely brilliant!! Keep up the good work and Thank you !!
in my first proper job, the content of these 30 minutes was basically all i needed to know to be a "specialist in database design" :D
This is a phenomenal explanation. So simple and direct.
Bro.. thanks! You made it so simple.
Really awesome video. I'm taking a class on relational database design and the lecture I attended on this topic was very convoluted. Your presentation and examples cleared everything up for me, thank you.
@decomplexify
Жыл бұрын
My pleasure. It's one of those topics that somehow lends itself to poor and convoluted explanations, so I'm glad if I succeeded in getting it across clearly.
A very long time ago (1996ish) the two guys who did all of the non-AS400 report writing both quit at our company. They were friends of mine, and both told their managers that I at least knew how to code in BASIC, and as all the operations reporting was in VB (mostly excel, some Access), I replaced both. I used their old Excel-based reporting system for awhile, but HEAVILY gravitated to Access (we weren't IT, so "When all you have is a hammer..."). Seeing all this laid out like this is kind of refreshing to see. Normalization -- self-taught as I was -- eventually got so ingrained me that I randomly build databases to organize things at home. Thanks for this. It's good stuff.
Perfect, I learned all this stuff in high school over 20 years ago. After watching this everything was clear again
This video actually is really very helpful. I dk why you have so less views. You deserve more.
Firstly, this is a delightful and clear explanation - thank you! It makes me nostalgic for the time when I would regularly hear such formalisms discussed in corporate IT settings. One of the difficulties you must encounter when teaching these concepts in the current era is that contemporary thinking in software engineering encourages designers to think of databases as _merely_ "storage" or "persistence" for an individual application. An implementation detail, trivial in to the real work of the system. Whereas Ted Codd and Chris Date conceived of the database as the information system itself. It would enforce universal logic and consistency. It was the main event. Applications that made use of the data would come and go. And they would adapt themselves to its schema, and its declared and transparent logic. (Transparent in its original sense, not in the way it has come to means its opposite - a black box.) Codd didn't predict a world in which each application had its own database, and there was money to be made as an "enterprise data integration and migration consultant". My career thus far has brought me to the disheartening conclusion that a really useful information system in an organization of any size or scale takes so much time, effort, and co-ordination to build (and evolve) that before it has reached even a third of its potential, there are already multiple generational conflicts around its intent and purpose.
@decomplexify
Жыл бұрын
I glad you liked the explanation; and thank you for those astute, historically-informed observations, which I very much agree with! I regard a database as a kind of template for expressing meanings. A lot of other people don't see it that way at all: they see it as a sort of parking lot for data. & as far as your disheartening conclusion goes, I can't really disagree with it. There's always going to be a drive towards a sweeping, unified information system (or an EDW) - because people who rely on information really could benefit from one of those - but in my career to date I haven't yet seen such a thing work out in the way people hoped and imagined it would.
@LeoOrientis
Жыл бұрын
@@decomplexify Thanks! If I were to be a little bit less disheartening, I'd say that the potential of RDBMSes is not even close to being fully tapped. And that the difficulty is that management dreams that technology will solve all of their human problems. In reality, we have to solve the human problems first. It's only then that the technology can begin to deliver on the wonders it promised. 😁 Thanks for doing a first-rate job at solving one of the most difficult human problems - understanding and communication!
The most concise explanation of Database Normalization Form ever read!
Thanks for this! Like others, I'm studying for a databases exam and needed a fresh explanation of normalisation. This video helped me refine my notes and cement it more in my brain.
I’ve been a database engineer for 25 years and this stuff is still super useful. Thank you
@2greenify
Жыл бұрын
Serious? I hope that was a joke.
@jam-trousers
Жыл бұрын
@@2greenify no joke. Sorry, genius
The importance of this video cannot be overstated. Well done.
In a few years' time this video is bound to have milions of views. Congratulations on such an amazing (and simple) explanation!
Great video! I would say the issue of repeating groups in 1NF isn't clear about the repeating group. A repeating group is more than a multivalued attribute. It is a repeating group because, in your example, the quantity and the item belong together. In the first row, player jdog21 isn't just associated with multiple quantities and multiple items. The quantity and the item are associated (e.g., 2 with amulet and 4 with ring are correct, while 4 with amulet and 2 with ring would be incorrect). A multivalued attribute should be separated into a different table, as you showed. But, if the quantity and item were not related, then a three table design would be better {(player), (player, item), (player, quantity)} so the 4NF problem isn't created. What makes it a repeating group is that the association of the first value of quantity with the first value of item, the second value of quantity with the second value of item must be maintained.
@aniloid3029
8 ай бұрын
Thanks, I was wondering about that part!
Normalization your gateway to “left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on left join on”
@austin4855
Ай бұрын
Mhm. I think it's always good to start by striving for 5NF... and then work backwards from there, denormalizing with extreme care to optimize for specific cases. I'll violate BCNF and stick an attribute in there that doesn't depend on the key, knowing it increases write complexity, if it improves read performance on a table where reads are occurring thousands of times more frequently than writes do. But I ALWAYS start by designing the fully normalized schema. In other words: sometimes DEnormalize, NEVER *fail* to normalize.
using this videos for university... and it's clear htat you know the subject to perfection, otherwise you wouldnt be able to explain it so brightly clearly. Thank you very very much man.
Really clean and easy to grasp content. Great work!
Best video I have seen on this topic. But just a little concern is that at 23:27 why model column can have duplicate values? Isn't it primary key?
@decomplexify
2 жыл бұрын
Good spot! Sorry about that, the primary key for the Model_Colors_Available table should have been shown on that screen as {Model, Color}; the primary key for the Model_Styles_Available table should have been shown as {Model, Style}. I'll see if I can add an annotation to the video that corrects this.
Good explanations! One criticism: I was confused what First Normal Form (INF) meant until I realised that the letter I was a digit 1. It might be better to use a font that makes these two characters more easily distinguished.
I'm so happy I found your videos about normalization. I've been struggling to understand the topics really and I have an exam in database in a couple of days and after I saw your video it made so sense. Thank you for making this videoes :D
"I hope you find this video helpful" - I find this video way too helpful. Thank you so much for making things so clear to understand. great job.
This is a very clear explanation, you’ve earned a sub. Can’t believe you don’t have more subscribers.
Hey thank you for this. I'm in a master's program and this was a super simple and understandable take on this
Well that was two weeks of lectures summed up nicely. THANK YOU!
I have spent half afternoon studying the DB normal forms, and wish I had found this video before all the others I have watched. This was in fact the only worth watching, so far.
Elegant and simple! I love the way you do it. Keep it up!
The best tutorial for a topic I have ever watched on youtube.
I'm very glad to see someone able to articulate this somewhat esoteric topic so eloquently and succinctly! My initial foray into DB started at home on a PC with a copy of IBM's DB2 for DOS that a dad of one of my mates... ahem... acquired for me. This lead to an entire lifetime of love for and a career in databases and data integrity, starting with teaching database theory and design at my university as a postgrad to finally running my own IT school where I teach database theory to the advanced highschoolers. Educative content such as this is so valuable to those coming after us... Keep up the top notch work!
@Cobalt985
2 ай бұрын
Not that esoteric, I'm learning this in my first year CIT diploma. It's extremely frustrating that the same problem of all other STEM field and academia in general is here too, with such esoteric language and confusing explanations, but the internet makes that a much easier thing to combat nowadays at least.
This is excellent! Explains it absolutely well. Keep up the good work!
Dude! You SERIOUSLY need to make more videos. This was EXCELLENT! If you did, you would have WAY more than 9.95k subscribers.
Damn. This is an impressively approachable and brief explanation.
Thank you so much for this. It's amazing how much easier you taught me this than my university did
damn dude this enlightening, not only as a "Normalization" course but also as a "RDBMS" course, thanks a lot!
Can't go without dropping a thank you note ! ..Your video helped me a lot. :)
Best Video on normalization. Thank you for making this absolute gem of a video !
truly appreciated you. You just explained all in a clear way. amazing!
bro is literally inconceivably awesome
Been a long time since I last revisited the 5 NFs, impressive video, really like the slides and not being a typical powerpoint thing. :)
I've worked with Relational Databases since 1983 (when IBM released DB2) and this is one of the best and clearest explanations of normalization I've ever seen.
@houdamaarfi
4 ай бұрын
how is that even possible ?
Thank you so much sir. I learned more here than I have the last 5 weeks I took in my database class
This is phenomenally well explained and invaluable - this has made my life SO much easier! Thank you!
@decomplexify
9 ай бұрын
You're welcome - I'm glad it's helped!
Love this video, covered all my concepts regarding the normal forms as well as the anomalies
What memories. It’s nearly 30 years since I looked at normalisation. This video bought back many memories.
oh wow! I read the number of subscribers as 260k and thought: oh underrated! keep up the good work! the introduction alone was 10/10!
Subscribed! If your other videos are like this one you have my respect as a creator 👏
beautiful explanation! very clear and elegant, cut to the point
Your "real world examples" seriously helped prove your point, because my uni reference material has similar-ish theory as you, but the examples are absolutely bad in them... your video seriously clears up a lot!
This is the best video I have came up so far on normalization
Great video! Easy to follow and good explanations. Thanks!
Thanks for this. You have given me a way to fix many problems at work. Inspiring!