I have a study project that has to create a kind of gallery. Assuming I have a limit of 20 images per post. How to register these images in the database?
I thought of two hypotheses. On the 1st I would create about 22 columns in a table called postagens
, it would be something like ID TITULO IMG1 IMG2 IMG3 IMG4
and so on. I just do not think it's the best shape, because it's so many columns, and not all of them will be filled. On one hand I would be able to work with each image individually.
In the 2nd hypothesis I thought of only 3 columns, something like ID TITULO CONTEÚDO
. This Conteúdo
would be the HTML code of the entire post, but in this case I'm limited, as it will not work with each image individually.
I am in doubt between these two hypotheses. Are there any 3rd, 4th or 5th? Remembering that the project works directly with images, then the malleability with regard to the administration of the photos is a crucial point