Solved

SQL Compression

Posted on 2011-09-15
6
213 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
ID: 36542915
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
ID: 36543047
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
ID: 36543329
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
[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

 
LVL 4

Author Comment

by:asp_net2
ID: 36543680
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
ID: 36544160
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
ID: 36544446
Thank you!!!
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I get blanks instead of zero's to show up in my results? 2 30
SQL Help - 12 60
Merge Statement 3 39
SQL profiler equivalent in MS-Access 3 42
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 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

21 Experts available now in Live!

Get 1:1 Help Now