Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
what are the best tips for storing images in a database?

In those study cases of image storage,

  • An image that change only once in a while, if it changes at all (like an image for an article)
  • The image case from above is not only one image but over 10, that link to the same article
  • An image that have changes very often (like a banner image for a website)
  • The image above is huge

What is the best approach for each case? What is the "right/faster" way to do this task in each scenario ?

share|improve this question

marked as duplicate by Jarrod Roberson, Walter, GlenH7, Thomas Owens Dec 10 '12 at 18:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Also Related:… – maple_shaft Dec 10 '12 at 19:01
@maple_shaft Excellent link, thank you. Answered my question =) – Michel Ayres Dec 10 '12 at 19:14
up vote 2 down vote accepted

Sorry to provide a link only answer, but this microsoft research paper goes into great detail on the advantages of file system vs database for file storage:

To BLOB or Not To BLOB

share|improve this answer
How much has storage changed over the last 7 years? – Wyatt Barnett Dec 10 '12 at 19:44

My default answer to the default image storage question is to do both -- store the original in the database, but use caching to serve it out of the filesystem. It gives you all the advantages of the database -- that is transactional updates, easier backup management and transportability as you can just deploy from the database while also preserving the filesystem's advantages of speed of serving static content.

share|improve this answer
Hmm nice idea, the problem is the cost in server and database. In small projects, I think, this is the best idea. +1 – Michel Ayres Dec 10 '12 at 17:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.