Jump to content

[SOLVED] How best to structure this table?


asmith3006

Recommended Posts

Hi,

 

I want to save information about products in a table. Each product can have up to 11 different 'features' and each 'feature' requires about 8 fields to record the data on that particular feature.

 

This is obviously going to be quite a large table with 11x8 fields in the end off it, most of which wouldn't get used that often (normally only 3 or 4 features are used).

 

Would I be better putting the features in a seperate table with 9 fields in, 8 to record the features and 1 to record the product code?

 

If so, can I make a 'view' to show me the table as if it were one huge table with each feature in a column after the other?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/147720-solved-how-best-to-structure-this-table/
Share on other sites

I think I'd break it down even further.

 

Take a look at the osCommerce structure attached. It's a bit daunting the first time you look at it, but you're interested in the following tables:

 

product_options

product_options_values

product_options_values_to_product_options

product_attributes

 

They're just right of center above the brown languages table.

 

If you want an example as to what data would go in each table I can probably provide it.

 

Regards

Rich

 

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.