1
I have a table for recording images that is used as a foreign key for other tables. The problem is that in one of these tables (PROMOCOES) the ratio is 1:N (a promotion for N images ), while in the other tables the ratio is 1:1. My question is on how to organize these tables because I cannot use foreign key within the table of images. This way it would be better to create a specific table of images of promotions, or create an intermediary table between PROMOCOES and images and continue using a single table of images?
The problem with using a foreign key is that you would need a key for each table that uses an image.
– Tassio Araujo de Souza
Welcome to Stackoverflow EN! Yes, I noticed this. I when it happens I create a table that relates the 2 tables, but no foreign key.
– Jorge B.
Thank you, that seems to be best practice.
– Tassio Araujo de Souza