Hi,
I've a few different entities that need to hold photos (one or many), let's name them A, B and C. Due to the fact that it's not possible to add OTM relation between each entity and a Photos table and keep all the FKs in a single column, it seems that the
following are the ideal options:
1. To hold a link table ("LINK_TBL") between the entities and Photos table, as follows:
A OTO LINK_TBL OTM Photos.
Each entity will hold the relevant PKs of LINK_TBL, and also PHOTOS will hold the PKs of LINK_TBL. in this case i will be able to create multiple photos for each entity (A,B and C).
2. To hold a Photo table for each entity with OTM relation, as follows:
A OTM PHOTOS_A
B OTM PHOTOS_B
C OTM PHOTOS_C
What is preferred? is there a better option that i didn't mention?
Thanks.