Lots of files to be stored -- Database or Filesystem?

  • Hello All,

    We are developing a simple Photograph management system where customers send the photographs(or even media files like avi,wav files) and we need to store the photographs. We have a basic DB schema in place but we are not sure if we need to store all these photographs in the database itself (we plan to use sqlserver-2k5) or in the file system.

    To give you the statistics we have about 1000 customers and on an average we assume each one of them will send at least a single photo everyday (approx 3-5 MB each - high resolution). The number of customers may increase to about 10,000 by one year.

    Any inputs from you will be highly appreciated.

    Thanks a lot in advance..

    Regards

    Vin

  • Put them under filesystem and use the db to store the path of the file.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Agreed. Keep files on the OS and store the path. Makes managing the files easier.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Agree with keeping the content outside the DB. However, down the road, how will you manage the organization of these images as they grow? Or will you rely solely on the DB for tracking the placement of the physical files?

    And, when you upgrade your storage and change the paths, how will you track those changes?

    Just when you thought the fun was about to begin....

  • Steve,

    Thats a important aspect that you have pointed out. I am now thinking in terms of separating the 'core data' and the storing of the images. There would be a 'middle' layer that would get the picture wherever it is stored (database or filesystem or any other dedicated image server in future).

    Any change in the number of pictures or the media or the location has to be updated in the 'middle' layer only thus leaving the 'core data' unaffected.

    Thanks once again

    Vinoo

  • Definitely store the images on a file system and the path to the images in the db, it's much more modular that way, and you can send emails with links to the photos for the customers to view (served by Apache or IIS, preferably the former), instead of sending the entire image, which could be very large.

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

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