Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

SQL Compression

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
asp_net2
Asked:
asp_net2
  • 3
  • 3
1 Solution
 
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooterCommented:
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
 
asp_net2Author Commented:
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
 
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooterCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
asp_net2Author Commented:
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
 
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooterCommented:
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
 
asp_net2Author Commented:
Thank you!!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now