in Search
ATTENTION: I've decided to put the upgrade on hold due to a compatibility issue of our server environment with the latest CS installer package. CS 2008 now requires SQL Server 2005 as the backend DB but our database server currenlty has SQL Server 2000 installed on it. I'll resume the upgrade once I figure out when Telligent is releasing a patch to the schema compatibility issue. For now, we will continue to use the old version of CS while waiting for the said patch. If you have any questions about this process, please don't hesitate to post them on our forums and I'll answer them as soon as I can. Thanks for your patience and support guys! I'll let you know as soon as this is resolved. - Keith Rull
Latest post 05-12-2008 10:19 AM by crawler486. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 05-11-2008 5:41 PM

    storing binary file in SQL Server

     Sir Keith,

    Is it good to store binary file like eg. pdf file, in a SQL Server ?

    • Post Points: 20
  • 05-11-2008 7:30 PM In reply to

    • lamia
    • Top 10 Contributor
    • Joined on 06-20-2006
    • Sampaloc, Manila
    • Posts 752
    • Points 13,110

    Re: storing binary file in SQL Server

    Makikisawsaw lang huh. Since wala pa reply si Keith, ako muna hehehe.

    For me, no. My usual practice is to just store the "location" of the file in the filesystem to say, a varchar field in your database. Interesting topic to ah.

     

    Convert limitations to great expectations... You are the creative force of your life...

    • Post Points: 35
  • 05-11-2008 10:21 PM In reply to

    • keithrull
    • Top 10 Contributor
    • Joined on 08-08-2005
    • San Diego, CA
    • Posts 1,956
    • Points 39,165

    Re: storing binary file in SQL Server

    lamia:

    Makikisawsaw lang huh. Since wala pa reply si Keith, ako muna hehehe.

    For me, no. My usual practice is to just store the "location" of the file in the filesystem to say, a varchar field in your database. Interesting topic to ah.

    Hehehe. Yup! This is a really interesting topic!

    I agree with Lamia. I have developed different applications that handle this type of scenario and 100% of the time the DBA and the Network Admin agrees that it is better and safer to have the file storage on the filesystem instead of the database. The point I always here when there is a discussion about this issue is the saying that you shouldn't put all your eggs in one basket. What we usually do is just create a field on a table that points to the location of the file and another field that specifies what type of location (e.g. filesystem, url, web service). This way we can update the location in the event that we change the storage type/location.

     HTH

    devpinoy sig

    • Post Points: 20
  • 05-11-2008 10:23 PM In reply to

    Re: storing binary file in SQL Server

     sir lamia thanks for the reply. but if we store the file in the filesystem is it possible to execute fulltext search on the filesystem?

    • Post Points: 20
  • 05-11-2008 10:29 PM In reply to

    Re: storing binary file in SQL Server

     sir Keith thanks for the reply. my next question is how to perform fulltext search on pdf file that is stored on a filesystem?

    • Post Points: 35
  • 05-11-2008 11:35 PM In reply to

    • lamia
    • Top 10 Contributor
    • Joined on 06-20-2006
    • Sampaloc, Manila
    • Posts 752
    • Points 13,110

    Re: storing binary file in SQL Server

    jerome1216:

     sir Keith thanks for the reply. my next question is how to perform fulltext search on pdf file that is stored on a filesystem?

     

     

    Hmmm... Haven't done this before but my idea is like this...

     

    1. Get eh location of the PDF from the database
    2. Using some sort of API, load the PDF and get the contents(whoah, isn't this big??, but it's the same when you store in RDBMS anyway)
    3. I'm not an expert about text types, but my idea is that the contents you get from the PDF should be human readable (ascii) so when you compare with the search query, they will match. Store the contents of the PDF in  String or something.

    Wow, I actually learned something new from Keith.:)

     

     

    Convert limitations to great expectations... You are the creative force of your life...

    • Post Points: 5
  • 05-12-2008 12:29 AM In reply to

    • marl
    • Top 10 Contributor
    • Joined on 12-15-2007
    • Long Beach, CA
    • Posts 319
    • Points 3,995

    Re: storing binary file in SQL Server

    jerome1216:
    ...how to perform fulltext search on pdf file that is stored on a filesystem?

    Since we couldn't agree more na we do not store the PDFs themselves sa database, siguro if you want to store the "content" of the pdf why not "strip" the text and store them?

    Take a look at this: http://devpinoy.org/blogs/marl/archive/2008/03/04/pdf-to-text-using-open-source-library-pdfbox-another-sample-for-grade-1-pupils.aspx

    devpinoy sig
    • Post Points: 20
  • 05-12-2008 12:34 AM In reply to

    Re: storing binary file in SQL Server

     thank you for the ideas sir lamia and marl. 

    • Post Points: 5
  • 05-12-2008 10:19 AM In reply to

    Re: storing binary file in SQL Server

    jerome1216:

     sir lamia thanks for the reply. but if we store the file in the filesystem is it possible to execute fulltext search on the filesystem?

    if you are going to store the PDF in the filesystem, try using Windows Indexing Service to support full text search on your PDFs. Then on your on SQL backend you can create a linked server to Windows Indexing service database to run your full text search queries. I'm not the person who actually implemented this, but thats what we are using with our commercial document management software. I can say its very efficient though.

    • Post Points: 5
Page 1 of 1 (9 items)