Best, simplest, easiest to understand relational database and relationships in a nutshell. No other videos come close to this one. Please don't ever take this video down.
Oh man, you really cleared that up for me, thank you so much. I couldn't wrap my head around the terminology, but you made the concept clear for me. Thank you!
Thank you so much for this video. I have been trying to understand how relational databases work and out of all the places I checked this is the only one that started at the beginning and didn't assume I was a computer expert. Thank you so much.
Thank you SO GOD DAMN MUCH friend. I was starting to play with PowerPivot and Table Relationships in Excel and was struggling to get a hold of this concept as I was trying to connect 2 table directly without considering that the new relationship itself would be the hosted by a whole new table! Many many thanks!!
Very well described many thanks, we are currently migrating lotus notes to a relational database and your video sums up incredibly well why we should be doing it.
I have never seen even a professor explained like thise easy human understandable ;anguage. I study in griffith University. But I could not find the way to easyness. But you are exceptional.
I keep wondering why people are asking about composite keys and primary keys. This is a GREAT beginning overview of relational databases and how they work. Unique identifiers pretty much covers those questions.
Yo, this was awesome. I'm studying Django with my dad and in the course we're studying there are Relational database concepts, I didn't know them that well, thank you for the help
Great video; really helps me better understand the basics - though I probably should've paid attention during class instead of tuning out, despite how difficult my professor makes it.
Thank you very much! Excellent presentation, clear and easy to understand. I've been struggling to understand this concept for ages, but you've put it very nicely in a nutshell.
Steve Jobs will be teaching a student who uses a Windows computer... Crazy shit huh?! Thanks a million for this truly helpful video! Very explanatory. Just what I needed for my MS Access classes. :)
I wondered about enrollment ID too. Correct me if I'm wrong but I think it's not even needed. Since you could combine classID and studID to be a unique Identifier. So a primary key consisting of 2 foreign keys.
You have the Customer ID once in the Customer table but can have it many times in the Orders table (though it really can be zero, one, or many times). This is a one-to-many relationship.
Correct. You will also sometimes see the notation of having a "regular" line for the "one" side and a line with two lines coming out of it - looking like a "peace" sign without the circle. That is the "many" side. There are other possibilities. TH-cam does not allow for links in comments , so I added a link to an image I quickly tossed together which shows more of "Crow's Feet Notation". If you look up "Relational Database Crow's Foot Notation" you will likely find more.
Hello Computer Guy, I am doing a relational database but I run into a doubt. if I relate CustomerTbl to OrderTbl, and OrderTbl is related to ProductTbl, will the CustomerTbl be automatically related to ProductTbl? Or I will have to manually relate the tables Customer to Product tables? please help me with that
I feel like it would be more helpful to single out some basic concepts before diving into the example, but overall the video is very well-made and clear. Love it
You can, but in most scenarios is not practical, even if enrollment id is not required its always usefull to ad an id column for many... many reason, you will understand that later.
I have a question about the enrollment ID. Is that a unique combination if StudentID/ClassID/Grade to avoid repeats? or is it more like calling each row of the middle database Enrollment1001, Enrollment1002, Enrollment1003, etc.to be able to call each row as needed?
I don't see why you'd need to avoid grade repeats, so probably for tracking every instance of a student being enrolled. The real question is how it's ordered. By student wouldn't make much sense, but if you did it by class then you could assign every class a range of enrollment ids to prevent overcrowding.
So what is the alternative to this strategy where you have a 3rd database acting as a middleman that represents the relationships between the first two database? Or is this pretty much the best way to do this. Also, what was the "grade" used for?
As I understood it, the 'grade' in the enrolments table represents the main INFORMATION that table gives you and the primary reason that table exists. You could use that table to see who are the high performing students in the school or who requires more attention. It is not fixed to any particular student or class but is focused purely on grades. An alternative to this database would be a hierarchical database or a network database. You could have the year level as the root node. Then you could divide that root node into subject nodes eg. math, english, etc. In this way you would have a single ROOT record that is continuously divided into PARENT and CHILD nodes forming hierarchical patterns and relationships. Each child inheriting certain traits from the parent records above it. The Database in this video shows an example of a different type of database that does NOT depend on hierarchy BUT on relationships instead.
From my understanding, I think you create the relationship as explained here, phpmyadmin is more of a tool to visualize your tables. So it would be the same as if I were to create the relationship in Plain SQL. So I would recommend drawing a diagram and revising the relational need of your table.
ok if this is the case then tell me please how do these concepts work in PHP? if we are retrieving classes that a particular student has in PHP look do we have to run another loop inside the loop?
stefanhyltoft I cannot imagine why, but if the same student was enrolled in the same class twice that would lead to problems. Is that even a possibility? I do not think so… and if that is the case your solution would also work. :)
stefanhyltoft Even then it would be a different class ID - the ID is tied to the specific class, not just the class section. Often schools will have things like PSY10120150001 for the first PSY101 class of 2015.
+Prescott Computer Guy I agree with +stefanhyltoft that you could make what is called a concatenated primary key by combining the studentID and classID for the bridge table, but it really comes down to personal preference. The benefit of having a concatenated primary key is that, as you mentioned, it will cause an error if a student enrolls in the same class twice. That is something that we never want to have happen so we enforce that rule with the concatenated primary key. It is better to have an error that you need to code for, and keeping faulty data out, then having the ability to somehow enroll a student in the same class twice.
Keynote on a Mac. Low end software and it works great for things like this. Did edit some of the timing and the like in post production with ScreenFlow.
Excellent Relational Database Concepts video. Do you have more videos in same the concept such as Database Tables, Primary Keys, Foreign Keys, and Relationships,Database Design etc. ?
9 years later and you're still helping people learn. Thank you.
U mean 11 years later…lol
13 years later
Best explanation I've come across, thank you 13 years in the future.
You are welcome!
Best, simplest, easiest to understand relational database and relationships in a nutshell.
No other videos come close to this one.
Please don't ever take this video down.
Thanks. No intention to. :)
absolutely brilliant. the only video i have ever watched that has made this topic make sense
Thank you!
Well suited for beginners! I am personally starting from ground 0 and this is THE one made any sense to me at all.
Thank you. Appreciate the comment.
Parry Sun Agreed. Now to figure out how to identify a "non-primary" key......
yes I completely agree with you, but I wished that he continued to explain the concept from A-Z.
damn that was really good, even by 2022 standards. I'm completely new to this field of programming so this was super helpful, thanks a lot!
only a minute in and this has explained relational databases 10x better than my teacher
Thank you for this video. As someone who learns well visually, I think this visualizes the concept clearly for beginners.
Man you absolutely killed this brake down explanation. God bless. Great job.
Thank you for your kind words.
One of the BEST videos that I have seen about RDBs Fundamentals!
And it's really great for visual learners as me )
P.S. I am from UKRAINE.
Oh man, you really cleared that up for me, thank you so much. I couldn't wrap my head around the terminology, but you made the concept clear for me. Thank you!
Glad it was helpful.
This i call good tutorial. Love you sir
Thank you so much for this video. I have been trying to understand how relational databases work and out of all the places I checked this is the only one that started at the beginning and didn't assume I was a computer expert. Thank you so much.
Thank you SO GOD DAMN MUCH friend. I was starting to play with PowerPivot and Table Relationships in Excel and was struggling to get a hold of this concept as I was trying to connect 2 table directly without considering that the new relationship itself would be the hosted by a whole new table! Many many thanks!!
You are welcome. Glad you found it useful!
Please edit your comment to remove the blasphemy of the holy spirit
Please edit your comment to remove the stupidity.
lytwaytLaz You're not too bright to not defend God
Very well described many thanks, we are currently migrating lotus notes to a relational database and your video sums up incredibly well why we should be doing it.
I have never seen even a professor explained like thise easy human understandable ;anguage. I study in griffith University. But I could not find the way to easyness. But you are exceptional.
jadav shanker thank you!
@@PrescottComputerGuy u r not dead yet ,😂
I keep wondering why people are asking about composite keys and primary keys. This is a GREAT beginning overview of relational databases and how they work. Unique identifiers pretty much covers those questions.
Wow!!! you explain 4 classes of database in 5 minutes....Thanks
Wow. 5 years ago this went online. It really inspired me.
Now 10 years ago
Yo, this was awesome. I'm studying Django with my dad and in the course we're studying there are Relational database concepts, I didn't know them that well, thank you for the help
Great video; really helps me better understand the basics - though I probably should've paid attention during class instead of tuning out, despite how difficult my professor makes it.
Another excellent presentation!
4,700 'likes' is a great accolade! Congratulations, PCG :-)
Thanks.
@@PrescottComputerGuy
is this the same way we can connect many to many tables by use that junction table?
@@norpriest521
Yes -- the "middle" table creates a many-to-many connection between the other two tables.
Thank you very much! Excellent presentation, clear and easy to understand. I've been struggling to understand this concept for ages, but you've put it very nicely in a nutshell.
This is still helpful in 2020,
Thank you computer guy
Steve Jobs will be teaching a student who uses a Windows computer... Crazy shit huh?!
Thanks a million for this truly helpful video! Very explanatory. Just what I needed for my MS Access classes. :)
This one was really made for the beginners
Finally! a good quality simple vid! Keep em coming! Thanks
I wondered about enrollment ID too. Correct me if I'm wrong but I think it's not even needed. Since you could combine classID and studID to be a unique Identifier. So a primary key consisting of 2 foreign keys.
After watching this nice video I am grateful to know I already make relational databases on excel.
Very clear explanation and presentation. Thanks.
Excellent, so concise and so understandable!
Thanks.
brock mcnuggets
Lmfao, the beast in the box , Brock Mcnuggets (Brock Lesnar music hits).
Agreed
You have the Customer ID once in the Customer table but can have it many times in the Orders table (though it really can be zero, one, or many times). This is a one-to-many relationship.
Direct to the point, good work
Correct. You will also sometimes see the notation of having a "regular" line for the "one" side and a line with two lines coming out of it - looking like a "peace" sign without the circle. That is the "many" side.
There are other possibilities. TH-cam does not allow for links in comments , so I added a link to an image I quickly tossed together which shows more of "Crow's Feet Notation".
If you look up "Relational Database Crow's Foot Notation" you will likely find more.
This video make me understand what relational database is. Thanks
Thanks! Excellent description of one-to-many relationships.
I love that all the students in the uni are studs.
almost 30.000 views...no dislike...that sums it up! thanx man ,great tut
Wow lovely great tutorial cleared all my doubts thankyou🥰
Very nice intro to database concepts. Exactly what I needed! Thanks
So when you pull a list out of enrollments, it should display the student and their classes(and grades)?
This was amazing and helpful. Thank you!
Excellent explanation. Thank you!
Great video, very enlightening and to the point, 10/10
Excellent , brief and crystal clear.
I wish I had watched this tutorial earlier, it took me too much to grasp these concepts at my own.
VERY clear, concise and helpful. Thank you!
Hello Computer Guy, I am doing a relational database but I run into a doubt. if I relate CustomerTbl to OrderTbl, and OrderTbl is related to ProductTbl, will the CustomerTbl be automatically related to ProductTbl? Or I will have to manually relate the tables Customer to Product tables? please help me with that
If I understand what you are saying, they will have a similar relation to what my "Students" and "Classes" have in the example I give.
I didn't understand the final part of the video .. did you mean that every record(enrollment) in the enrollments table has its own id ?
This is such an amazing video!!
Thank you!
Prescott Computer Guy is officially my tutor🙏
nice and precise video, no extra information and helped me a lot . . . keep it up
Nicely done. Do you have any more tutorials on relational databases, or MS Access? thank.
Clearest explanation I've seen. Well done!
I feel like it would be more helpful to single out some basic concepts before diving into the example, but overall the video is very well-made and clear. Love it
Thank u man you are the best .a am stress free now I'm going to the exam with confidence😀👏
that was awesome
Great job 👍🏼
That was very useful for my assignment, Thanks a lot mate...
Thank you - clear, concise and simple!
Student to Class is a one-to-many relationship. The Enrollment object creates a many-to-many relationship between students and classes.
if we keep picking one unique thing and relating it to other tables, wont we have an infinite amount of tables? < does that make sense?
thank you that was simple and in to the point no time wasted :D
We are adding this "enrollment id" to introduce a primary key in the table, right? Can't we use both a composite primary key?
You can, but in most scenarios is not practical, even if enrollment id is not required its always usefull to ad an id column for many... many reason, you will understand that later.
okay, thanks
I have a question about the enrollment ID. Is that a unique combination if StudentID/ClassID/Grade to avoid repeats? or is it more like calling each row of the middle database Enrollment1001, Enrollment1002, Enrollment1003, etc.to be able to call each row as needed?
I don't see why you'd need to avoid grade repeats, so probably for tracking every instance of a student being enrolled.
The real question is how it's ordered. By student wouldn't make much sense, but if you did it by class then you could assign every class a range of enrollment ids to prevent overcrowding.
Love the video. It was a great and quick review on what I learned about databases.
Perfectly explained. Thank you.
Still informative in 2019
This helped a lot. Thank you!
So what is the alternative to this strategy where you have a 3rd database acting as a middleman that represents the relationships between the first two database? Or is this pretty much the best way to do this. Also, what was the "grade" used for?
As I understood it, the 'grade' in the enrolments table represents the main INFORMATION that table gives you and the primary reason that table exists. You could use that table to see who are the high performing students in the school or who requires more attention. It is not fixed to any particular student or class but is focused purely on grades. An alternative to this database would be a hierarchical database or a network database. You could have the year level as the root node. Then you could divide that root node into subject nodes eg. math, english, etc. In this way you would have a single ROOT record that is continuously divided into PARENT and CHILD nodes forming hierarchical patterns and relationships. Each child inheriting certain traits from the parent records above it. The Database in this video shows an example of a different type of database that does NOT depend on hierarchy BUT on relationships instead.
Great video for beginners. Very well presented :) Awesome work
Great, concise informational video. Thanks!
Thank you, this was not diffult to understand than my teacher in college
Thank you for awesome explanation. Could you please advise me where to look into for learning normalisation in Database. Thanks!
I'm so dumb. Would you have to do a vlookup in the fat table to drawn in the student and class id and do the headings need to be the same?
Nicely done. Very helpful. thanks!
Good tutorial,,,
Glad you liked it
Great video and excellently explained.
You are sincerely welcome. Glad it helped.
Wow, that was great! May I ask what program you were using to create your presentation?
Uuugg, why aren't there more videos that explain databases this well? Thanks for making this video!
so do you need 3 tables to have 2 linked tables?
If you want a many-to-many relationship, yes. If you just need a one-to-many relationship you do not.
Prescott Computer Guy oh okay thanks, do you know how to link tables on phpmyadmin? cheers for the feedback btw
From my understanding, I think you create the relationship as explained here, phpmyadmin is more of a tool to visualize your tables. So it would be the same as if I were to create the relationship in Plain SQL. So I would recommend drawing a diagram and revising the relational need of your table.
Thank you for that great explanation!
Perfect! Just what I needed to understand it!
ok if this is the case then tell me please how do these concepts work in PHP? if we are retrieving classes that a particular student has in PHP look do we have to run another loop inside the loop?
You could also make a primary key set out of studentID and classID I guess, instead of making enrollmentID.
stefanhyltoft I cannot imagine why, but if the same student was enrolled in the same class twice that would lead to problems. Is that even a possibility? I do not think so… and if that is the case your solution would also work. :)
Prescott Computer Guy
I guess if they had to take the same course twice cause they didn't pass it could make problems
stefanhyltoft Even then it would be a different class ID - the ID is tied to the specific class, not just the class section. Often schools will have things like PSY10120150001 for the first PSY101 class of 2015.
stefanhyltoft This would break if you wanted to keep track of the semester/year that the course was taken.
+Prescott Computer Guy I agree with +stefanhyltoft that you could make what is called a concatenated primary key by combining the studentID and classID for the bridge table, but it really comes down to personal preference. The benefit of having a concatenated primary key is that, as you mentioned, it will cause an error if a student enrolls in the same class twice. That is something that we never want to have happen so we enforce that rule with the concatenated primary key. It is better to have an error that you need to code for, and keeping faulty data out, then having the ability to somehow enroll a student in the same class twice.
Watching this in 2022. Still relevant.
2024😅
Very good introduction!
Very clear! This helped a lot
What program have you used to make this video ? Not to record the video but to make the tables and animations.
Good video, very useful!
Keynote on a Mac. Low end software and it works great for things like this.
Did edit some of the timing and the like in post production with ScreenFlow.
so the enrollment is the form shown before?? i mean the relations between students and classes??
Very good explanation, thank you
You are welcome.
Thank you - appreciate it.
this was made the year i was born omg
You likely still live with your relations... so this video is for you!
:)
Why does enrolment also need a unique key?
Nice teaching in dbms.....realtional concept...
well explained...short and simple.
Excellent Relational Database Concepts video. Do you have more videos in same the concept such as Database Tables, Primary Keys, Foreign Keys, and Relationships,Database Design etc. ?
Really nicely done.
Can you show us how a one to one, one to many and many to many relationship in a real and concrete table looks? Thank you very much!