Solved

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

Posted on 2014-10-27
3
301 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:BobCSD
3 Comments
 
LVL 32

Accepted Solution

by:
Stefan Hoffmann 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 1

Author Closing Comment

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now