Link to home
Start Free TrialLog in
Avatar of dkmarsh
dkmarsh

asked on

vb.net sql server solution - store images in file system or database ?

I am building a VB.NETsolution that allows users to load their own images. The images will be mostly JPG format with a few other formats

I am trying to work out whether I should store these images inthe SQL Server database, or as files outside the database.

If I do store them in the database, how do I provide the paste / upload function that allows users to create a new image ?

I would appreciate feedback on what the best approach would be.

Thanks




Avatar of bmatumbura
bmatumbura

I suggest you store the images in a folder and not in the database. This will keep your database lean because images tend to occupy too much space in a database.

I have done this on one of my solutions where I had to keep photos of all visitors at some company.
I also recommend you store the images in the filesystem and not in the database, just store the paths in the db. SQL Server was not designed to be a filesystem and so doesn't work as well as one.

This question crops up quite often, and the answer is always the same. Have a look at some of these articles too:
http://databases.aspfaq.com/database/should-i-store-images-in-the-database-or-the-filesystem.html
http://www.sqlteam.com/article/images-and-sql-server

HTH
Avatar of Éric Moreau
SQL Server 2008 as a new feature called FileStream. It is exactly what you want.
Definitely consider using FileStream. For many if not most scenarios Filestream supersedes the old dilema about whether to put large objects in the database or filesystem. There are one or two constraints on what you can do with Filestream but it can also give you the best of both worlds.
http://technet.microsoft.com/en-us/library/bb933993.aspx
ASKER CERTIFIED SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkmarsh

ASKER

great summary - thanks