I would like to know if storing pdfs in a database table is a good long term idea. Here is a description of the problem:
I have a customer that has hundreds of clients that upload numerous pdf files as proofs. These pdf files range from fairly small ( < 100K ) to 10MB. These files can potentially get uploaded multiple times as they are proofs for a single project (i.e. proof1.pdf, proof2.pdf etc..) PDFs for each customer must remain separate, and PDFs for each project must remain separate for each customer.
Currently it is set up where the files are uploaded directly to a folder created for each client for each project. This is OK but does take up space and finding files can be a bit of a nightmare. Like I said multiple proofs will be uploaded for each project and each customer.
The best solution I can think of is to provide an interface that will upload PDF files directly into a db table which keeps track of the customer id, project id, and proof. This provides much better security, and provides the ability to get all PDF files from each customer for project X.
A database cleanup tool will be developed to delete records that are older than a specified period of time, so the table will not continue to grow forever, but I am worried about the performance hit (if there is one) and other negatives that I might be overlooking.
So, overall is this a good idea or should I figure out a better way to handle this in the filesystem?