Sample Header Ad - 728x90

Is it ok to have multiple files table for a different entity?

0 votes
1 answer
290 views
I have two entities A and B. A and B can have multiple files associated to them, each of those files can be a document or an image. Does it make sense to create a_files and b_files tables with the the following structure? id | a_id | url | type(enum) id | b_id | url | type(enum) I thought about creating a generic files table too and then reference it through a/b_files, but it seems to me a kind of over-killing joins.
Asked by Federico Peralta (103 rep)
Jan 24, 2022, 09:14 PM
Last activity: Jan 25, 2022, 12:35 PM