0

I want to build an online shopping system with 4000 products. Each produtcs have at least 3 photos, but some products have only 3, other products have maximum 10. (avg 7)

Which is the best practice? And why?

  1. I create a table, where I set id, product id and 10 colums for images and I will manage 1 row/product (~12 colums and 4000 rows).

  2. I create a table, where I can store only id, 1 column for image (~3 colums and 28.000 rows)

I think, the 2nd version is better write- and readable with PHP, but I am afraid of too many rows.

I know that MySQL can manage 1 million rows too, but this is a small hosting package (~12$/year) not a full server.

Gabreil
  • 3
  • 1

0 Answers0