link@lemy.lolOPtoPostgreSQL@programming.dev•Ways to remove child when parent deleted in 1:1 relation
1·
1 year agoWhat do you suggest for not using an image more than once? It bothers me too that image table is in non-standard use.
The thing is, image table used on 4 other tables and if I want to put FK on image table I have to:
- Add 4 optional foreign keys to the image table and use only one
- Create 4 different image table that each of them related to the related 4 tables
Neither of these looking ideal to me.
Yep, I guess I should control it from software side.