DEV Community

Discussion on: Why Storing Files in the Database Is Considered Bad Practice

Collapse
 
tomberend profile image
Tom Berend

All sorts of GOOD reasons to store files in a database too. You can search for them by multiple keys, you can keep generations of updates, you can encrypt them and control/log who sees them, etc. You can implement source-control protocols for non-text documents (eg: show me the last 20 versions of this Powerpoint). You can keep multiple related documents together (perhaps translations of the same document?). Perhaps you have tens of thousands of documents (eg: EDI messages).

Collapse
 
agtoever profile image
agtoever

Indeed. Data integrity, access control, versioning and audit trail are the features that come to my mind as well. These requirements are much more difficult to realize (in combination) using a filesystem based solution.