Skip to content

Instantly share code, notes, and snippets.

@gopalkildoliya
Last active September 13, 2017 11:53
Show Gist options
  • Save gopalkildoliya/c484eb08ec90535923bf0a1e60c91fdd to your computer and use it in GitHub Desktop.
Save gopalkildoliya/c484eb08ec90535923bf0a1e60c91fdd to your computer and use it in GitHub Desktop.

File System vs Database to Save Files

File System

Pros

  • Performance can be batter then DB in case of large files.
  • Saving and downloading is easy.
  • Migration of data is easy. Just copy the folder and paste it on destination.
  • Economical: In case of large number of data. Can use Cloud Storage like AWS S3 etc.

Cons

  • No ACID (Atomicity, Consistency, Isolation, Durability) means no guarantee. Files are stored outside of database.
  • Security: To save the file you have to give write permissions which can lead to security problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment