From the course: MySQL Database Administration

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Solution: Table relationships

Solution: Table relationships - MySQL Tutorial

From the course: MySQL Database Administration

Solution: Table relationships

- [Instructor] All right, this is the solution video for your assignment on understanding table relationships. As a reminder, you were trying to help Emily, the owner of Online Learning School. She wants to understand her database a little bit better, specifically how the three tables relate to each other, what their primary keys are, foreign keys if they exist, and the relationships between those tables. Hopefully you were able to get to the solution on your own. Now let's jump into Workbench and I'll walk you through the solution. All right, so the first thing I'll do is just run my use onlinelearningschool and make sure the onlinelearningschool is set as the default schema. Then I can look at each of the tables. So we've got our table list here on the left in the schemas tab, course ratings, course rating summaries, and courses. So I'll start with courses, and we can just do a select star, we need to select star from or else it won't run. Take a look here. So the online learning…

Contents