The reportTo column is a foreign key that refers to the employeeNumber column which is the primary key of the employees table to reflect the reporting structure between employees i.e., each employee reports to anther employee and an employee can have zero or more direct reports. We have a specific tutorial on the self-join to help you query data against this kind of table.
The reportTo foreign key is also known as recursive or self-referencing foreign key.
Foreign keys enforce referential integrity that helps you maintain the consistency and integrity of the data automatically. For example, you cannot create an order for a non-existent customer.
In addition, you can set up a cascade on delete action for the customerNumber foreign key so that when you delete a customer in the customers table, all the orders associated with the customer are also deleted. This saves you time and efforts of using multiple DELETE statements or a DELETE JOIN statement.
The same as deletion, you can also define a cascade on update action for the customerNumber foreign key to perform cross-table update without using multiple UPDATE statements or an UPDATE JOIN statement.
In MySQL, the InnoDB storage engine supports foreign keys so that you must create InnoDB tables in order to use foreign key constraints.