Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello friends.
I am working on a asp.net project and Oracle as my back end Database.In the application I am working on, I have to upload images and save it in the server.I have to make a choice between saving the images in the Oracle database or as separate file in the server and save only the image path in the database.
Which option is the best one?Any help is highly appreciated.
Thanks in advance.
Posted
Updated 5-Jan-12 11:48am
v2

I think saving the image in database is the best option. rather than saving the image in file system and the file path in database. cause if the image files needs to be moved to a differet location of the server ( due to some space crunch or somthing) all the path references stored in the DB needs to be updated. But in case you save the whole image file in DB as binary format, the data (the image files) is already present in your system.
 
Share this answer
 
This is vary biased opinion :) but I would actually do both. Instead of writing the image inside the database I'd use a BFILE to store the image to a folder and also to have the pointer in the file created at the same time. For more information see: Working with LOBs and BFILEs[^]
 
Share this answer
 
Comments
Espen Harlinn 5-Jan-12 16:38pm    
The "Professional" solution :)
Wendelius 5-Jan-12 17:15pm    
Thanks, probably not the easiest to implement, but a lot of fun :)
this article will help you to decide the same:

http://research.microsoft.com/apps/pubs/default.aspx?id=64525[^]

If also depends on the usage of images. if the image size is less than 200 KB, then you can use database otherwise use filesystem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900