views:

66

answers:

2

actually i m devloping a web application that provides facility to users upload the image as we see in orkut and facebook through a form and a upload button.but the actually problem I am facing is :

1.should i store the image in database using Large data objects ie BLOB and the problem arises of retrieving it back from the database and then displaying it on the form.

2.sholud i store the absolute path of the the image in database and provide it to the source tag of the image in the html form.

+2  A: 

I would advise against saving images in the database. This usually gives poor performance since files work better from the file system, data in the database etc.

It will also be harder to scale the database when the number of images grows than to just store them in a file system.

I would store the path to the file in the database, you can store a relative path and then have a constant in the web application to the root directory containing the images.

Neal Donnan
A: 

This will be of use to you. The Facebook engineers had a nice talk concerning Efficient storage of Billions of Photos

The Elite Gentleman