Пікірлер
@justarandomname
@justarandomname 16 сағат бұрын
more please, thank you!
@IssamZeinoun
@IssamZeinoun 17 сағат бұрын
you did a wonderful job!!!
@MrTomfooligans
@MrTomfooligans 2 күн бұрын
Exceptionally well made content from a naturally gifted instructor. You are helping people like me make it to the end of school in one piece and what you're doing is so valuable. Thank you.
@ahnov6670
@ahnov6670 3 күн бұрын
imagine yapping for 8 hours about this just to be outplayed by a random guy on youtube in 28 minutes
@n4ff4h
@n4ff4h 5 күн бұрын
Noice explanation! Really helpful :)
@gregbrown9287
@gregbrown9287 7 күн бұрын
Very nice video. It explains the normal forms well. At the end of the 4NF discussion (starting around 23:27), the Model column does not uniquely define each row in either table. Shouldn't we also include the Color or Style columns in their respective tables for the complete Primary Key? Or am I missing something. Thanks!
@decomplexify
@decomplexify 7 күн бұрын
Thanks! Regarding 4NF, please see the Corrections section in the pinned comment.
@jannatulmahjabinfaiza6573
@jannatulmahjabinfaiza6573 8 күн бұрын
i think this is the best explanation of database normalization. especially for the beginners like me. i saw so many tutorials and read a chapter of this topic but couldn't be able to get this steps so easily. but this tutorial helped me to understand those steps so smoothly.
@captainrelyk
@captainrelyk 9 күн бұрын
Apparently there are 6 normal forms. Which means the seventh normal form breaks reality itself and could show us how reality works by showing it’s a database, allowing us to bend it to our will Or maybe it’s late and my imagination is going wild
@awakenbeast2944
@awakenbeast2944 9 күн бұрын
23:30 After the decomposition, the primary keys for tables are not just model it is {model, color} for first and {model, style} for second table
@decomplexify
@decomplexify 9 күн бұрын
See the Corrections section in the pinned comment.
@YoussefAdelZin
@YoussefAdelZin 10 күн бұрын
the last result table is wrong as there is not match for 3 ,4,5 in approver_emp_number so the result should contain only 3 rows where they match please tell i am wrong i am looking at for hour trying to know why
@decomplexify
@decomplexify 10 күн бұрын
Take each row in the table, look at its Approver Employee Number (call it n), then find a row in the Employee table whose Employee Number is n. That's the matching that this join is doing.
@YoussefAdelZin
@YoussefAdelZin 9 күн бұрын
@@decomplexify thanks so much but would I be right if we mixed it to be E.employee = AP.aprovel right
@decomplexify
@decomplexify 9 күн бұрын
​@@YoussefAdelZinIf you did that, the query would still return 6 rows, and the headings in the query output would become misleading because "e" is now the approver and "ap" is now a person who gets days off approved by the approver. So the query wouldn't really make sense any more. But it would return 6 rows.
@YoussefAdelZin
@YoussefAdelZin 9 күн бұрын
@@decomplexify I understand but it would not contain 2,3,5 it will contain two 1s and three 6s and btw thank you very much for carrying and answering me
@jiajinzhou5263
@jiajinzhou5263 10 күн бұрын
thank you for the video! it's very well explained
@jobink5
@jobink5 10 күн бұрын
I am not sure how primary key showed in 23:30 is correct. How can Model be the only primary key?
@decomplexify
@decomplexify 9 күн бұрын
See the Corrections section in the pinned comment.
@muhammadsajidrazaansari8074
@muhammadsajidrazaansari8074 12 күн бұрын
Super
@manishsahu3557
@manishsahu3557 12 күн бұрын
we need window function on sql
@tarusheebhalla1196
@tarusheebhalla1196 12 күн бұрын
In the example even category data type column is considered a Primary key, we can do this way? it should be Unique, no null value and numeric? since rule says that they should be atleast one Primary key, what if I only have category data type columns, cnot numeric, what is the solution ?
@decomplexify
@decomplexify 12 күн бұрын
Primary key attributes don't have to be numeric.
@damonguzman
@damonguzman 13 күн бұрын
Maybe it's my inexperience talking but what are the benefits for any of these approaches over having every table have an "id" column that is either an autoincrementing integer or a UUID (dealer's choice). These other primary key implementations seem like a large amount of mental overhead and complexity to achieve what I am interpreting as the same thing. Are there any drawbacks to this "simple" approach? The only ones I can think of are: 1. Indexing UUIDs takes more space than integers 2. Integers are easily guessable so UUIDs are better for authorization and security use cases. For me at least, it creates a significantly simpler mental model. Every table, without exception, has a primary key column named "id" and you are free to add constraints to the additional columns to achieve desired outcomes.
@decomplexify
@decomplexify 11 күн бұрын
Excellent question. There are lots of advantages to using single-column surrogate keys (which is what you're talking about) as primary keys. Should you do this on every table without exception? Personally I would say no. Some tables don't benefit from this approach, in my opinion, and it's important to know what these are: 1) "Linking" or "resolver" tables. Example: we've got a table called Player with primary key Player_ID (an auto-incrementing integer). We've got a table called Item with primary key Item_ID (an auto-incrementing integer). So far, so good. We've also got a table called Player_Item in which each row represents that a given Player presently owns a certain quantity of a given Item. The primary key of Player_Item, a table which is a sort of linking or resolver table, should be the composite key {Player_ID, Item_ID}. 2) Certain types of reference data tables. Example: we have an application which is all about handling complaints. A complaint can have a status of Pending, Active, Resolved, or Cancelled. The application has a workflow that lets you (as a user) do different things with a complaint depending on what its status is. Now, suppose we have a Status_Ref table with 4 rows in it, one for each status. I personally would create the table with an attribute Status_Code (which has values like 'PND', 'ACT', 'RES', and 'CAN') and an attribute Status_Description (which has values like 'Pending', 'Active', etc.); and I would designate Status_Code as the primary key of the Status_Ref table. Imagine now another table: Complaint. One of the attributes of Complaint is Status_Code, which is a foreign key to Status_Ref. This works perfectly well and it's very convenient to be able to get the Status_Code (like 'PND') straight off the Complaint table. In contrast, having a Complaint table with a Status_ID (like 123e4567-e89b-12d3-a456-426614174000) referencing Status_Ref.Status_ID, which forces you to go to the Status_Ref table to ascertain that the status in question is 'PND', is a needless overcomplication in my opinion and sacrifices simplicity/transparency for no real gain. Finally, when using surrogate keys, your point about "you are free to add constraints to the additional columns to achieve desired outcomes" is very important. Most people who make use of surrogate keys, I find, don't bother to do this bit!
@jernejlobnik9419
@jernejlobnik9419 13 күн бұрын
great vid tnx
@bidiptadas1122
@bidiptadas1122 15 күн бұрын
Great explanation 😃
@thomaskaiser2475
@thomaskaiser2475 15 күн бұрын
Nice, i was going crazy reading these textbooks that take way too long to get a point across its ridiculously bad. This video allowed me to finish my 2nd week assignment for database concepts class. And it all makes much more sense now.
@CamaradaJoao
@CamaradaJoao 15 күн бұрын
On Most Popular MOvies of The Year table there is no way all the atributes are candidate keys, because they all repeat on the table, except for movie name.
@decomplexify
@decomplexify 14 күн бұрын
As mentioned at 8:00, {Release_Year, Popularity_Ranking} is a candidate key, and so is {Release_Year_And_Month, Popularity_Ranking}.
@santocyriac1458
@santocyriac1458 16 күн бұрын
This video is a whole better than the 9 hour lecture we had on this same topic
@luuu_na35
@luuu_na35 16 күн бұрын
My brain blown up when reading these definitions, like "What?". Thanks for simplifying it in a way I can understand!
@barakasfr5102
@barakasfr5102 18 күн бұрын
Amazing video
@dawnskinner1920
@dawnskinner1920 20 күн бұрын
Thank you! This is the best and clearest explanation for this topic that I have encountered.
@XhaxhiThoma
@XhaxhiThoma 20 күн бұрын
Heroes don't need to have some magic superpower, explaining to others this topic and other topics clearly is a great superpower to have. I don't know how to reward you enough for the explanations!
@julien957
@julien957 20 күн бұрын
OMG I was about to post a comment on 23:27...and I just saw your corrections ;). Your content is amazing and you explain it so well!
@masoodahmad2175
@masoodahmad2175 22 күн бұрын
I know my comment is a little irrelevant, but can you please tell me what are the fonts you are using? these are amazing.? Please share the name or the link if possible.
@edwardduda4222
@edwardduda4222 26 күн бұрын
So much better than the explanation given in my Database Systems class. They explained everything with alpha's and beta's in set notation. Thank you for this!
@RM-xr8lq
@RM-xr8lq 28 күн бұрын
dam my db already failing 1NF
@CrushedAsian255
@CrushedAsian255 21 күн бұрын
At least you’ve got a schema, I can’t keep changing schema every day
@ytouate
@ytouate 16 күн бұрын
😂
@7DYNAMIN
@7DYNAMIN 8 күн бұрын
you monkey !
@amir-ali8850
@amir-ali8850 8 күн бұрын
Bro u a real one 😂
@munteanionut3993
@munteanionut3993 3 күн бұрын
🤣🤣🤣🤣🤣🤣
@rajnikant_roy
@rajnikant_roy 28 күн бұрын
I might be wrong but for the example Most_Popular_Movies_Of_The_Year, shouldnt only Movie Name be the candidate key? As candidate keys are a minimal set of keys that uniquely identify a tuple
@decomplexify
@decomplexify 28 күн бұрын
When we say that a candidate key is a "minimal superkey", what we mean is that it is a superkey that contains only attributes that (in combination) ensure uniqueness. It does not contain any attributes additional to those. On this basis, there might be several candidate keys for a given table. For example, {Release_Year, Popularity_Ranking} is a candidate key, but if you add "extra" attribute Movie_Name to it, you get {Release_Year, Popularity_Ranking, Movie_Name} - which is a superkey that is not a candidate key. Another way of thinking about this superkey {Release_Year, Popularity_Ranking, Movie_Name} is that it's what you get when you add "extra" attributes Release_Year and Popularity_Ranking to the candidate key {Movie_Name}. Whichever way you look at it, this superkey consists of some candidate key plus some extra attribute or attributes.
@rajnikant_roy
@rajnikant_roy 27 күн бұрын
@@decomplexify aah got it thanks for the quick explanation
@gingeas
@gingeas 29 күн бұрын
I scoured so many database normalization videos in my undergraduate 4yr ago and none of them come near this one. My college self is finally happy
@LeetStack
@LeetStack 29 күн бұрын
it is so great to finally understand what and why I was doing what I was doing, while following youtubers who don't explain anything.
@lucaliberato
@lucaliberato Ай бұрын
hi, the video was very helpful. Btw, i'm not sure if i understood well the difference between superkeys and composite keys. Superkeys are a type of composite keys that can consist also of one attribute while the other must be 2+?
@wizlif144
@wizlif144 Ай бұрын
Database breathing 5th form
@jakemeyer8188
@jakemeyer8188 Ай бұрын
This video is so good, it's officially labeled as "bad-ass", and is 3NF compliant.
@MrLanorian
@MrLanorian Ай бұрын
Show demais!!!!😆
@josefkaras7519
@josefkaras7519 Ай бұрын
wouldnt the year and month also break atomicity rule of 1nf?
@decomplexify
@decomplexify Ай бұрын
Database theorists like Chris Date and Hugh Darwen nowadays consider "atomicity" to be a fairly meaningless concept. They say the notion of being "non-atomic" would be either so sweeping that it includes everything, or so subjective that we can't usefully apply it. For example, suppose there's a table that has a column called Number_Of_Members. This column has values like, for example, 27. But 27, if you think about it, really means 2 tens and 7 ones. So 27 isn't an atomic value; it is decomposable into parts. On this basis, any table with an integer column would violate First Normal Form. The same would likewise be true of any string column, because a string can be decomposed into individual characters. The same would likewise be true of any date column (which decomposes into year, month, day of month). And so on. And yet this would be absurd. This is why people like Chris Date no longer regard atomicity as a 1NF criterion, and neither do I.
@zaferemrekilinc4138
@zaferemrekilinc4138 Ай бұрын
you are amazing
@huthaifa5
@huthaifa5 Ай бұрын
Thanks!
@huthaifa5
@huthaifa5 Ай бұрын
Very nice explanation and delivery of thoughts. Looking forward to more videos like this, explaining basic but important software principles.
@nintishia
@nintishia Ай бұрын
Thanks a ton. You made it all so simple and easy.
@FrankKritzman
@FrankKritzman Ай бұрын
Great video, thank you!
@mariajosepav
@mariajosepav Ай бұрын
THANK YOU! You explain this in a way that is practical and easy to follow. I much prefer this method of learning (visually and with examples) to memorizing a bunch of formal definitions. I understand learning about theory is good, but to really GET it I think you need someone to explain concepts like you do.
@mikemixsosa4264
@mikemixsosa4264 Ай бұрын
Great Video!
@piotrlezanski5156
@piotrlezanski5156 Ай бұрын
Hi, why in the second table Locker_id is cannot be primary key? It identifies every row, there are no duplicates.
@decomplexify
@decomplexify Ай бұрын
To make Locker ID the primary key is to declare that each Locker can only ever have one reservation. It means once this single reservation is made, no one can reserve that particular Locker ever again (because doing so would be a primary key violation). Focus not on the rows that happen to be in the table right now, but rather on the rules we want to enforce for what rows are and aren't allowed in the table.
@piotrlezanski5156
@piotrlezanski5156 10 күн бұрын
@@decomplexify Thanks a lot!
@schwifty3785
@schwifty3785 Ай бұрын
Great video dude Lots of loves and prayers
@Chris-tq1jy
@Chris-tq1jy Ай бұрын
Funny how Chat GPT recommended this video.
@Salalkhan
@Salalkhan Ай бұрын
can you please tell me the Font name you are using in the video? Will be thankful
@decomplexify
@decomplexify Ай бұрын
Kalam
@thomaspotterdotexe
@thomaspotterdotexe Ай бұрын
The PM and the owner : "F it, we will deploy it in 5 hour, we'll think about it later"
@adiporsh
@adiporsh Ай бұрын
It is not mandatory to have a primary key in 1NF. Every row should be unique which can be enforced by a single or multiple columns using a candidate key .
@decomplexify
@decomplexify Ай бұрын
I think you've misunderstood what a "primary key" is. A primary key doesn't have to consist of just a single column. A primary key can consist of multiple columns: for example, ALTER TABLE Customer_Address ADD PRIMARY KEY (Customer_ID, Address_Sequence_Number). In SQL, the only way you can prevent duplicate rows in a table is by adding a primary key constraint or unique key constraint to the table.
@adiporsh
@adiporsh Ай бұрын
@@decomplexify @decomplexify Primary key is not mandatory in 1 NF. Candidate key should work based on the requirement. However, primary key is desirable... i should've been specific...