postgresql - How to decide whether to store binary data in Postgres or in files? -


i'm developing postgres-backed system, in many binary files stored.

i have @ least 2 choices:

  1. store them in postgres.
  2. store them files.

what criteria need consider make best possible decision?

i consider following:

  • performance. storing binary files in file system performs better, both reading , writing.
  • security. access files in file system controlled operating system, if store files in database, postgresql access rules apply.
  • backup consistence. if store data separately (file system , database) difficult have consistent backup. file system backup , database backup out of sync.
  • transactional properties. file system not transactional, postgresql is.

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -