I am relatively new to dynamic web applications. I am working on a product inventory web app and wanted some critique/suggestions for my schema. I am using php to interface with mysql. I am keeping track of product information, product images, and the categories/sub-categories that the product belongs to. Right now I have one table that keeps track of the categories, one that keeps track of the sub-categories, one for products, and one that keeps track of the product-category pairs. The 'pairs' table is whats updated any time we change the category placement around. The talbes are attached as tables.sql...., am I attempting to achieve this in a proper way? Looking for suggestions and comments?
Also, any suggestions for storing images in mysql using php, instead of writing them to the file system