How to model the Product table of a database? This table should store the following information: id, product name, quantity, price, status (if it is in stock, if it will be returned) and information pertinent to each type of product: food (natural and industrialized) , bed / table / bath, clocks (and props like bracelets and necklaces), perfumery articles, electronics and home appliances and furniture.
This table should allow filtering by characteristics of each product, each feature is relevant to one type of product, so I should be able to filter furniture by type of wood and computers by amount of RAM, however both characteristics belong to a single product type.
SQL that I've done:
CREATE TABLE products (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
quantity INT NOT NULL,
description VARCHAR(1000),
price DECIMAL(7,2) NOT NULL,
status INT NOT NULL,
created DATETIME,
modified DATETIME
);
* She is following CakePHP naming conventions.
OBS: The DBMS is MySQL latest version.
EDIT:
Following guidelines obtained through the question: #
Types:
- Drinks
- Type of drink
- Package Contents
- Provider
- SAC
- Food
- Expiration time (1 month, 2 weeks)
- Type (industrialized, in natura, dehydrated, powdered)
- Brand
- Producer Region
- Nutrition Facts
- Furniture
- Material (metal, wood)
- height
- width
- depth
- weight