Originally Posted by tangoforce
I've never been sure about storing many images in a DB.
I think this is one of those instances where neither approach is always the beeter way. Only by considering all the pros and cons of both approaches can you decide which of the two uis the better for a given situation.
Placing the images in the database means that they are
1. synchronised with the resto fothe associated data - so that a rollback doesn't leave images behind.
2. security where the image is only accessible to those who have access to that field
3. automatic backup - where the team responsible for backing up will automatically back up all the images with the database (there have been instances where the application owners forgot to ask to have the image folder backed up and when the database needed to be restored after a drive failure they found that they'd lost all the images
Keeping the images separate means that
1. they take up less space
2. they are accessible by people who don't have access to the database
3. can be shared with other applications that don't use the database
and if you think about it a bit you can come up with many more reasons for each having advantages over the other. Then you need to decide which of the advantages are the most important for your application so as to determine which approach to take.
You can't just say that one approach is right and one is wrong because both can be right depending on the circumstances. Anyone who just states that you should never store images in the database has obvioulsy only ever worked on very small applications because as applications get bigger the advantages that storing the images in the database provide gradually gain in importance.