I have a database oriented at clients and services provided. In several tables I would like to store documents, e.g. under clients a copy of passport and under companies a copy of the articles of association, mostly pdf's and doc's.
Currently I have the documents stored in the respective tables directly at the user record which helps me separate confidential user information. Information on the files I can all extract from the contents and filename depends on the record where it is stored.
But now I need to add friendly column names to the (medium)blob fields. I see two ways (apart from solving it in my php-application):
1. Adding a table with column_name, friendly_column_name or 2. moving all files to a dedicated files table and a file_type table with the possibility of storing additional information on the files and file_types like the friendly column names.
Disadvantage would be the additional overhead of linking files to tables and users and from a security point of view the risk to have a user view other users documents.
Is any of these possibilities best practice or is it up to my preference?