framented images?

  • Hello, I am developing web app and we opt to store images in DB. those images must not be manipulated by anyone, and very few people will retrieve them, but some images are 100KB to 5MB. Is it a good idea to fragment the images that are greater than 500KB? and store them in different rows. Is this best practice?

  • No. Then you'd have to stitch them back together to actually show the image. (I'm assuming you mean something like JPG or PNG files when you say "images".)

    The usual would be either store them in varbinary(max) columns, or in the filestream version of varbinary(max). This has data on whether you should use filestream or not, and how to do so if you do: http://technet.microsoft.com/en-us/library/bb933993(v=sql.105).aspx

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I agree with GSquared, I can't think of any case where chunking them up would be beneficial and see LOTS of downsides. How big do you think this is gonna get?

    CEWII

  • It will grow in the order of 5 of PNG, JPG, BMP files per day assuming on average of 2 MB each. I looked into the link GSquared refere me to and filestream looks tempting. although there will be a screening process to eliminate some files...

  • How often will they be accessed?

    If the number is fairly small I probably wouldn't use FILESTREAM..

    CEWII

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

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