Adding specific information to a local file
For a SQL Server solution, FILESTREAM (or FILETABLE if you can use SQL Server 2012) was built to solve this type of problem.

This solution will allow you to store the files in a central network location (most importantly, not on a web server box) outside the database, and manipulate metadata information within the database.

As mentioned in my comment, other RDBMS systems may also have similar capabilities (I'm not familiar enough with them to say, though).