I’ve been looking at the Opencart database structure and basically, they have a product table, a category table, and then a table with 2 columns which links a product_id to a category_id.
What is the reasoning behind this? Would it not make things simpler to just include the category_id as a column in the product table?
Because a product can belong to more than one category and signifies a many-to-many relationship. It is part of the normalization process.