permaculture playing cards*
The moose likes JDBC and the fly likes To store files/images in a database or not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "To store files/images in a database or not" Watch "To store files/images in a database or not" New topic
Author

To store files/images in a database or not

John Cogan
Ranch Hand

Joined: Jan 22, 2003
Posts: 32
Hi,
This is probably one of those questions that spans a couple of saloon's.
I am constructing a web application, using MVC servlets, jsps and mySQL, to store articles and images.
Users of the website are allowed upload images and word documents. I'm wondering what is received wisdom regarding storage.
Is it best to upload these files to a directory and store the file names in the database or is it best to store the whole file as a blob in the database?
Any comments would be gratefully received.
John


----------------<br />SCJP, SCWCD
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I have always read and heard that storing images and files in general in a database will hinder performance. Personally, I always store them seperately and store the location in the database.
I would also like to hear other opinions on this though..


GenRocket - Experts at Building Test Data
Sainudheen Mydeen
Ranch Hand

Joined: Aug 18, 2003
Posts: 218
Originally posted by Gregg Bolinger:
Personally, I always store them seperately and store the location in the database.

I will go with Gregg. I had done the same thing in one of my projects and I found it to be good approach. Resulted in a better data management and performance.
-Sainudheen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To store files/images in a database or not
 
Similar Threads
File object
designing jsp page
Serving Up Image Outside of Root
Storing uploaded files straight into a database
Saving images in database from servlet