locked
BLOB vs LINK RRS feed

  • Question

  • User442013226 posted

    Hello everyone,

    I have a website that sotres many images from movies. Some of these are very large up to 20MBsome are very small. I was just wondering what the best way to store these images is. At the moment I have them stored on the disk of my server, and I have for example a column in my database called CoverImage which stores a link like "Images/DateNightCvr.jpg", this seems to work well but I was just wondering what the performance differences are between these two ways of storing data.

    Thanks

     

    James 

    Monday, May 17, 2010 7:56 PM

Answers

  • User-863835478 posted

    Your current way is the best. See below:

    http://forums.asp.net/t/1096999.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 17, 2010 11:03 PM
  • User581921910 posted

    Hi,

    I think you should atlease save the Thumbnail of the images in DB and show them as Big. Will that be efficient enough right ?

    Thanks,

    Thanigainathan.S 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 18, 2010 4:16 AM
  • User-952121411 posted

    The only time I reccomend storing files as a BLOB in SQL is when the images or files contain sensitive data (i.e. Medical Images, etc.) where you need the security that SQL Server provides.  Otherwise storing and reading the file from a File Sytem is much faster; you can keep a reference to the file's location in SQL Server for the best method.  Read this as well:

    "performance wise, including an <IMG SRC> tag generated by the database and pointing to a file that already exists is going to be faster than pulling the file out of the database, generating a temp file on the web server, and streaming that to the user. Also, table scans take more resources when there is an image datatype as opposed to a varchar that simply holds a 'pointer' to the file's location." 

    Should I store images in the database or the filesystem?

    http://databases.aspfaq.com/database/should-i-store-images-in-the-database-or-the-filesystem.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 18, 2010 3:16 PM

All replies

  • User-863835478 posted

    Your current way is the best. See below:

    http://forums.asp.net/t/1096999.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 17, 2010 11:03 PM
  • User581921910 posted

    Hi,

    I think you should atlease save the Thumbnail of the images in DB and show them as Big. Will that be efficient enough right ?

    Thanks,

    Thanigainathan.S 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 18, 2010 4:16 AM
  • User-952121411 posted

    The only time I reccomend storing files as a BLOB in SQL is when the images or files contain sensitive data (i.e. Medical Images, etc.) where you need the security that SQL Server provides.  Otherwise storing and reading the file from a File Sytem is much faster; you can keep a reference to the file's location in SQL Server for the best method.  Read this as well:

    "performance wise, including an <IMG SRC> tag generated by the database and pointing to a file that already exists is going to be faster than pulling the file out of the database, generating a temp file on the web server, and streaming that to the user. Also, table scans take more resources when there is an image datatype as opposed to a varchar that simply holds a 'pointer' to the file's location." 

    Should I store images in the database or the filesystem?

    http://databases.aspfaq.com/database/should-i-store-images-in-the-database-or-the-filesystem.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 18, 2010 3:16 PM
  • User442013226 posted

    Thankyou everyone,

    I think you've convinced me to stick with my orgininal plan :)

     

    James 

    Tuesday, May 18, 2010 4:51 PM