Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Files as BLOBS or on disk?

Author  Topic 

abuhassan

105 Posts

Posted - 2006-12-14 : 10:51:21
Hi

I wanted to ask a question in terms of design (Performance, scalability, maintenance, flexibility etc.) is it better to refernce a document on the actual file system (on a file server) i.e. from a database link to the actual file at a disk location
e.g. in the database have something like \\fileserver2006\test\newtext.txt or C:\test\newtext.txt

or is it better to store all the files in a database as blobs?

The Question i would like to ask is more in the context of desigining a document management system?

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-14 : 11:05:47

http://www.aspfaq.com/show.asp?id=2149


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-14 : 11:06:18
In my opinion it is better to store files on the file system and reference them using UNC pathnames. Storing files inside the database will unnecessarily load the server.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2006-12-14 : 11:31:28
Personally, I like to use the file system. Here's a couple of reasons:
1. The file system is easier to work with than BLOBs (in my opinion)
2. If I need to restore one file, restoring a SQL backup and grabbing one BLOB outta there is a pain.
3. If I store the "root path" to the files one place, and then store the rest of the file path in the database table that contains the files, I can very easily move all of the files to a different root path. This is good for maintenence / scaling as you run out of disk space. You can just add more more drives, copy all the files over to the new drive, and then write one UPDATE statement to change the "root path" and bam, everything works.

I'm sure I can come up with more, but that should get you started. I've always been told "use the file system for files, and the RDBMS for data."

Michael

<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>

Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-12-14 : 12:08:08
See also: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Image,Images
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-12-14 : 12:43:28
http://www.sqlteam.com/item.asp?ItemID=986
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=37980
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=45564

source: FAQ "Sticky" http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210
Go to Top of Page
   

- Advertisement -