Solved

asp.net storing images in the database versus the file system

Posted on 2014-10-27
3
312 Views
Last Modified: 2014-10-28
I am updating an old asp classic website. The old website stores the images on the file system. I am updating to asp.net where I upload and store my images in the database.

I've read some pros and cons on storing in the database versus the file system; but it's not really clear what the final recommendation is. Can anyone just tell me in a nutshell what you believe the pros and cons are?

1. I will need to import my file system images into my database. Will this be possible to read the images from the hard drive and then put them into the database? (If yes, I will ask a new question on how to do that.)

2. I will be using a cloud server and when it needs to spin up a new copy of the database for replication, will having the images in the database cause any problems?

3. Will my costs be greater? I will be using Rackspace cloud, so if I just have a file sharing server versus storing images in the database, what might be the difference in storage costs? Any ideas?

4. The structure of my field for storing the image is this, any suggestions on something else? I am using VS2008 now for testing, but will up to 2012 when I move to the host.
[UserProfileImageContent] [varbinary](max) NULL,

thanks!
0
Comment
Question by:Starr Duskk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 34

Accepted Solution

by:
ste5an earned 250 total points
ID: 40408142
1. Yes.
2. Yes. Your database is larger, thus replication will take its time. btw, what kind of replication?
3. Depends. Are you charged by storage? Also requesting the images from database should cost more CPU.
4. Consider using FILESTREAM. This allows your web server to read the images like normal files (over a share).
0
 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 250 total points
ID: 40408177
Files in the file system could get moved/deleted/renamed.  When stored in the database then they are 'safer' - but at a cost (the database is BIGGER).
0
 
LVL 2

Author Closing Comment

by:Starr Duskk
ID: 40408732
Thanks! I've decided to going with storing the images on the drive.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question