why are displayed so many records for the same employee number?
the employee number within the t_employees is unique, and in the t_dept_manager the number of records depend on the number of contracts made, right?
I would appreciate a detailed explanation on this.
Thanks for reaching out.
The answer will reflect the structure and data we’ve chosen for the data tables from this database.
Here’s a brief summary that you will hopefully find useful.
t_employees contains data about all employees, where all employee IDs are a primary key. Therefore, in this table, the employee number can be nothing but unique, since we distinguish the records by the employee number.
t_dept_manager contains information about all managers, and this information is only their employee number, the department where they are managers, as well as the start and end dates (if applicable) for their contract(s).
t_dept_emp steps on t_employees in the sense that it still refers to employee numbers, but shows the departments where they are working, as well as the start and end date of the respective contracts.
As you move along and practice the relevant questions, you will further get used to the data stored in these tables and the relation between them.
Hope this helps.