From the course: CompTIA Data+ (DA0-002) Cert Prep

Unlock this course with a free trial

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

Joining multiple tables

Joining multiple tables

- [Instructor] Joins can involve more than two tables. In fact, joins can and commonly will include three, four, or even more tables. It's not unusual to join together a dozen tables when you're using a complex database schema. Let's say that we want to answer this question. Show me the names, titles, and department names of all current employees in the research and development group. This requires four tables. We begin with a section of the schema that we already know, the Employee table, and the Person table are joined together using business entity ID. I need the Employee table to get titles, and the Person table to get first and last names. I also need the Employee Department History table. This is a linking table that relates employees to the department where they work. This table has a foreign key relationship to the Employee table using business entity ID. And finally, I need department names which are stored in the Department table, and there's a foreign key relationship from…

Contents