using Title table instead of dept_manager table
Is it wrong to use title table to retrieve only managers? If I use title table, i get a different result.
Hi Jihyun!
Thanks for reaching out.
Please note that in the 'employees', the data is organised better than most of the databases out there, so you could refer to the emp_no field also in the 'titles' or 'salaries' table, for example. So, depending on the task, you may not need to also use the 'employees' table. However, we advise you to always join your data with the data from the 'employees' table since the latter is the one containing a full list of employees that have worked/been working for the company. In other words, by creation, if data about a certain employee is missing from the 'titles' or 'salaries' table, you should be able to find it in 'employees'.
Since we abide by this logic, you will see that in most of the queries throughout the course we also refer to the 'employees' table for information.
Hope this helps.
Kind regards,
Martin