From the course: SQL Essential Training

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Tables and Entity Relationship diagrams

Tables and Entity Relationship diagrams - SQL Tutorial

From the course: SQL Essential Training

Tables and Entity Relationship diagrams

- [Instructor] Now, as we mentioned, joins can be used to combine more than just two tables. Adding additional tables using joins is pretty straightforward. All we need to do is follow the same pattern as the inner joins we have already demonstrated. A great place to start when planning to write a join is the ERD or entity relationship diagram to first understand how tables may be related. We can see that in addition to the relationship between the invoice and customer tables, there is also a relationship between the support rep ID from the customer table and the employee ID from the employees table. Now, even though these two fields are called completely different names, when you think about the context of these names in the tables that they reside, they make sense. A support rep in the customer table is internally referred to as a support representative. And in the employee table that same support rep is referred to as…

Contents