I am creating a niche productivity SaaS like MS Teams and like teams, I want to be able to store files in many different contexts (team, chat, etc).
I was thinking originally that a single table would give me better performance than separate tables. but then I realized I would have to add another security layer as this would invalidate the row level security
So if I do separate tables (TaskFiles, ChannelFiles…) I can keep the security in place.
What are best practices for having a lot of files in different places?
Have a datatype called file, make a field called file and have it be of type file. Then on any of the other data types you want to have files saved to, make a field that is called file list and have it be related to the file data type you created…that is one way, and there are other ways as well.
That is interesting. It seems obvious now that I see your solution. I was thinking too if I need Folders then I can do the same thing. Attach the folder list object to where I want to add folders and then a file list on the folder object.