Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Compression

Posted on 2011-09-15
6
Medium Priority
?
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 30

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 30

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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 30

Accepted Solution

by:
Rich Weissler earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

670 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