Store pdf's in database --- text, image, or filestream?

  • We need to store several pdf files in our database. They are generally about 300K (or less) in size. They will not be searched but needed only for quick retrieval. Which datatype (text, image) would be most appropriate? Or do you recommend using a filestream (varbinary(max) datatype.)?

    TIA,

    barkingdog

  • Please see this link.

    Text/image are depreciated - they are going away in a future version of SQL. Use varbinary(max) instead.

    Which to use: FileStream or varbinary? It depends:

    How many files to store? 300k isn't too large, but you might want to consider putting this into a table that is in a filegroup all to itself.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • I thought that "varbinary(max)" was actually the equivalent of filestream. Yes, no?

    Barkingdog

  • The general recommendation for using FileStream is average file size larger than 1MB.

  • But since text\image are depricated and the pdf's (because of size) are not the best candidates for filestream, what datatypes reamin that I can use?

    Barkingdog

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply