I am new to PHP / Databases ... But I pick it up pretty quickly. I would like to ask you guys quite simply. I want to normalize my database and am not sure how to do it. I understand the concept, but I see several ways to do this. Drawing. I would ask people with some experience.
Here is my database (so far 2 tables): Brands Products
***Brands Breakdown:***
1 id int(6)
**Note:** Above, I will probably use 4-Letter codes for each brand instead of primary/int/auto.
2 name text
3 logo varchar(20)
4 phone varchar(20)
5 website varchar(30)
6 contact_name text
7 contact_number varchar(20)
8 contact_email varchar(30)
9 warehouse varchar(20)
10 pricing varchar(15)
11 bio varchar(300)
***Products Breakdown***
id (INT(6) / Auto_Increment)
brand (This is where I'll insert the four letter code for brand)
category (e.g. Brakes)
subCategory (e.g. Brake Rotors)
details (e.g. Drilled and Slotteed 'Razr')
sku (Part #)
minYear
maxyear
make (e.g. Subaru)
model (e.g. Impreza)
subModel (e.g. WRX STi)
description (Paragraph on part describing it)
specs (I imagine this can be expanded on. need cells somewhere for sizes / colors / engine codes / etc.)
msrp
jobber
price
cost
weight (of part)
warehouse (Could be moved to brand table)
image (URL of image for the part)
So, my main question is: do I have each brand has its own table, similar to my current product table? or is there a category table? "subcategories"? How do you guys normalize this data?
I would like to have a solid database while I study this stuff, so I will find out the right way. Any advice would be appreciated.
UPDATE:
, , , , , , - - cardinality". , !