From the course: SQL: Data Reporting and Analysis

Unlock the full course today

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

EDIT: Visualize your database

EDIT: Visualize your database - SQL Tutorial

From the course: SQL: Data Reporting and Analysis

EDIT: Visualize your database

- [Instructor] Now that we understand a bit more about keys, indexes, and constraints, we're going to move on to see how our tables link together. We're going to look at a diagram that shows all of the tables and all of the links. And we're going to do that using a common database diagram. Here we are representing the rental table as a box, and in the shaded area at the top you can see the name of the table, it's rental, and then within the paler region underneath, we have rental_id, which is the primary key, P for primary, and three foreign keys listed with an F for foreign. If we go and have a look at the rental table in the structure tab, we can see we have a rental_id, which is a primary key, inventory_id, customer_id, and staff_id, so three foreign keys, so that's where I've got that information from to draw that box. I'm not listing any other indexes, such as rental date, in my diagram, because they are indexes and…

Contents