January 10, 2003 at 7:35 am
Should PDF files be stored in a SQL Server database? I'm using 7.0 and the current system stores the physical location of the pdf file (approximately 50000 files, growing to 100,000 or more in near future). Under consideration is moving the actual file into SQL Server (stored as an image file I believe). I posted question on email list and some say it's OK to save on SQL Server and some say it's a bad idea. Why is it good/bad?
thanks!
January 10, 2003 at 8:50 am
If you search for blob, you'll get tons of opinions, probably 90% in favor of keeping in the file system. I like putting them in the db so that I can secure them, back them up, have better access control. Reasons not to are to keep db size down, not use more memory for caching blobs, easier to put files in a folder than load into a table.
Andy
January 10, 2003 at 10:35 am
I favor the filesystem, but that's me. Andy has good arguments in another thread (http://www.sqlservercentral.com/forum/topic.asp?TOPIC_ID=4169&FORUM_ID=9&CAT_ID=1&Topic_Title=Images:%20Store%20in%20SQL2000%20or%20on%20File%20Directory?&Forum_Title=General) on this.
Steve Jones
January 13, 2003 at 2:57 am
We have a similar situation here where we store venue maps as JPegs and brochures an PDFs. The arguments were the same, filesystem or in SQL. We opted for the file system in the end to keep the hits on SQL down in size, easier access for the clients to get to and change the files if necessary. We just drummed into out network support that they had to ensure that the directories were backed up regularly and the users to save the files in designated places.
---------------------------------------
It is by caffeine alone I set my mind in motion.
It is by the Beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
January 13, 2003 at 9:48 am
For us to answer that question (DB or File system), we really ask different questions first. How will the image (PDF, or blob) be read and will there be modifications? When dealing with images displayed to a web page, we tend to keep them in the file system. When we deal with internal utilities and have the option of using SQL replication, we have configured the database. If the images get archived in a different pattern/timeframe than the related data, we are back to the file system. Sometimes the use of the blob requires "chunking" out the blob that is inconvenient for some developers and environments which again argues for using the file system.
These issues are the reason you get paid the big bucks 🙂
January 13, 2003 at 2:01 pm
My vote is to put them on another server, where they can be backed up. blob fields can and do affect performance if the table is used alot, Also there are issues with blob fields not being replicated in merge or transactional replication if you use update blob. Also you are not storing the blob in multiple locations, which can be a plus or minus depending on how big your blobs are.
January 13, 2003 at 4:38 pm
The better question might be how easy would it be to recreate the pdf file if it ever was deleted. If you can recreate the file then the file system is probable the location to keep them. If you can not recreate the file then the server would be the location to store it. We use both methods at work, any file that we can recreate we store in the file system with the path and file name stored inthe server, any file that comes from an outside source that we could not recreate we store in the server.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply