Solved

SQL Compression

Posted on 2011-09-15
6
211 Views
Last Modified: 2012-05-12
Hello Experts,

Is there a way to Compress data that will be stored as an "Image" field type? Are there pro's and con's? If so, what are they.

Here is my delema. I have 600+ employees who will need to upload 5 PDF files per employee and each PDF file is restricted to only allow 1MB per PDF file to be uploaded.

I was asked if there is a way to further compress those PDF files.
0
Comment
Question by:asp_net2
  • 3
  • 3
6 Comments
 
LVL 29

Expert Comment

by:Rich Weissler
Comment Utility
To answer the question asked: If you are using the tools to author the PDFs, you can sometimes use the tool to decrease the size of the file, for example (http://help.adobe.com/en_US/Acrobat/9.0/Standard/WS65C0A053-BC7C-49a2-88F1-B1BCD2524B68.w.html)

Some additional thoughts: If you are developing a new application... consider not using the IMAGE datatype.  It's deprecated, and expected to be dropped from SQL in a future version.

If you are developing a new application, and have the the option of building it using SQL 2008, and are storing 'largish' files like this... consider using FILESTREAMS.
0
 
LVL 4

Author Comment

by:asp_net2
Comment Utility
Hi Razmus,

>> To answer the question asked: If you are using the tools to author the PDFs, you can sometimes use the tool to decrease the size of the file, for example (http://help.adobe.com/en_US/Acrobat/9.0/Standard/WS65C0A053-BC7C-49a2-88F1-B1BCD2524B68.w.html)

The average user will either NOT do this or will NOT no how :(

>> Some additional thoughts: If you are developing a new application... consider not using the IMAGE datatype.  It's deprecated, and expected to be dropped from SQL in a future version.

I'm current application is using SQL Server 2005. From what I read the "image" type was the best field type to use for storing PDF files. If you have a better / preferred method for SQL 2005 then please share your opinion.

>> If you are developing a new application, and have the the option of building it using SQL 2008, and are storing 'largish' files like this... consider using FILESTREAMS.

Correct, I see that the "image" field type is no longer supported for SQL Server 2008 but i'm not sure if I will be so lucky to be able to purchase another DB. Is FILESTREAMS the "image" type replacement?
0
 
LVL 29

Expert Comment

by:Rich Weissler
Comment Utility
Unfortuntately PDFs tend to be pretty 'dense', and compression techniques tend not to do much for them.  Apparently there are some programmatic methods of doing the equivalent of opening the PDF, and cleaning them up so they shrink in size.  I believe one is built into the Adobe SDK, and there is a third part tool (as an example) here: http://www.leadtools.com/sdk/pdf/compress-image-pdf.htm

image is still supported in SQL 2008 -- it's just discouraged with the understanding that it'll be going away.  The equivalent replacement is varbinary(max).  That recommendation still applies in SQL 2005

FILESTREAM is a method of using the filesystem to store files/binary objects, with integrated links in the database.  (If you've ever worked with a system where folks store files in a share, then stores URLs for those files... this is a replacement for THAT.  And it keeps the files integrated into the backups, etc...)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Author Comment

by:asp_net2
Comment Utility
Hi Razmus,

Not sure if FILESTREAM will work for me if I go to SQL Server 2008. I store ALL images and PDF's in the Database rather than the Filesystem and a link in the DB to the Filesystem. We create backups of our DB with 1hr increments so that is why we choose to store all images/pdf's in the DB.

What would you recommend that I use and why? Continue to use Image or VarBinary(max)?
0
 
LVL 29

Accepted Solution

by:
Rich Weissler earned 500 total points
Comment Utility
If you are comfortable with what you are doing, and it performs adequately for your purposes, go with what you are doing.. but if it isn't too late to change the datatype, switch the Image to VarBinary(max).
0
 
LVL 4

Author Closing Comment

by:asp_net2
Comment Utility
Thank you!!!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

16 Experts available now in Live!

Get 1:1 Help Now