I am creating an e-commerce store in Django and am currently trying to decide between implementing product images as an entity of their own then linking to the product by a foreign key or putting image fields as attributes in the product entity.
In the answers I've seen to this question, most people recommend implementing a separate table for images and I would prefer doing this because then, I will not have a limit to the number of images I can add to a product.
My concern however is, will this come at a huge speed cost for the customers using my website i.e. for my product listing page, I would have to, for each product, filter (query) the images corresponding to the particular product from a table of several images. I assume it would be faster if I make the images columns in the actual product table.
I would give a number of rows in the images table but, I have no idea how many images I will wind up having for the store.