Here comes the most important table:
product! It contains all products that are sold throughout the store, along with information on how to locate them.
Quick reminder: pay attention to the columns that have the same names as those from another table. For instance:
car.name AS car_name,
owner.name AS owner_name
ON car.owner_id = owner.id
name is available in both the
owner tables. In the query, we prefix each column's name with the name of the table it comes from (
owner.name). This way, the database knows which column we want to select.
Then, we use aliases to make the resulting query more readable.