Hi,
I am a php/mysql newbie and in my process of improving my skills i am working on a ecommerce personnal project. I am trying to change the structure of my db to meet the standard techniques.
After working with this db design for product…here it is:
product table
id product_name product_price product_desc product_img groupeid
1 bag red 2000 bag red cool bag_red.jpg 2
So i want to update the product table to: option1
id productname productprice productdesc product_img product_imgExt groupeid
1 bag red 2000 bag red bag_red jpg 2
2 shoes yellow 1000 nice shoes shoes_yellow jpg 1
3 Tie yellow 1000 nice Tie tie_yellow png 1
option2
img_ext table
id img_extention
1 jpg
2 png
product table
id product_name product_price product_desc product_img groupeid
1 bag red 2000 bag red cool bag_red 2
2 Tie yellow 1000 nice Tie tie_yellow 1
product_img_table
product_id img_ext_id
1 2
2 1
Which option is better to follow: the option 1 or option 2?