PDFs (or binary objects) in the database... When?

  • From: "Murching, Bob" <bob_murching@xxxxxxxxx>
  • To: "'Oracle Mailing List'" <ORACLE-L@xxxxxxxxxxxxx>
  • Date: Wed, 19 Oct 2005 12:53:13 -0400

We design a fair number of J2EE applications that (increasingly) require
storage and query/presentation of binary documents.... generally PDFs.
Occasionally our DBAs have been consulted with that age-old "should we store
these in the database or on a filesystem?" question by developers and
analysts when designing the application.  So far we've tended to put them on
the filesystem but honestly that's because we don't have any guidance on
when it makes sense to store them in the DB.

Obviously Oracle provides a level of security, access control and auditing,
along with (arguably) backup and recovery capabilities that might surpass
filesystem storage.  Manageability is easier when volumes reach the tens of
thousands of files.  On the other hand, there is a concern that putting tens
of thousands of objects in BLOB columns can impose some performance
overhead... perhaps inefficiencies in JDBC, or within Oracle RDBMS itself,
or ... ?  It certainly is "simple" to dump the PDFs on the filesystem and
storage file paths in a table.

Anyone else run into this?  In which direction have you leaned and how do
you decide?  And can anyone speak to what considerations should be kept in
mind when storing documents in BLOBs and querying them via JDBC, for either
browser presentation or manipulation in the midtier?

Bob

Other related posts: