(Database Design - products attributes): What is better option for product attribute database design

Posted by meyosef on Stack Overflow See other posts from Stack Overflow or by meyosef
Published on 2010-05-31T17:23:16Z Indexed on 2010/05/31 17:43 UTC
Read the original article Hit count: 1083

Hi, I new in database design. What is better option for product attribute database design for cms?(Please suggest other options also).

option 1: 1 table

products{
id
product_name
color
price
attribute_name1
attribute_value1
attribute_name2
attribute_value2
attribute_name3
attribute_value3
}

option 2: 3 tables

products{
id
product_name
color
price
}

attribute{
id
name
value
}

products_attribute{
products_id
attribute_id
}

Thanks, Yosef

© Stack Overflow or respective owner

Related posts about database-design

Related posts about relational-database