I'm looking at our DB design for products. First off, let me apologize; we've probably discussed similar issues and concepts before. Has anyone noticed that "search" here seems to suck? I can hardly even look to see our older discussions.
Our product table looks something like this:
id | title | category | seller | description | price | featured_zone_1 | featured_zone_2 | featured_zone_3 | featured_zone_4 | color | speed | metercount | condition | engine
And, actually, that's not the whole thing. There are 138(!) columns. Now, I didn't design it, but I'm thinking to try and improve it. What sort of normalization would be optimal? I've been looking at making some tables like:
create table brands(id int primary key, brand varchar(80));
create table colors(id int primary key, color varchar(80));
create table prices(id int primary key, price float);
So I'm thinking that this points towards 6th Normal Form. But then there will be a huge amount of JOINs necessary to create a Product object, right?
select p.id, p.title, p.seller, p.category, br.brand, co.color, pr.price
from products p
left join
br.brands on p.id = br.id
left join
co.colors on p.id = co.id
left join
pr.prices on p.id = pr.id
But I wonder if all I'm doing is a] moving complexity from the design into the query logic, b] increasing the load on MySQL with all these JOINs ...
Any thoughts?