Site images stored in DB vs Folders.

Discussion in 'Databases' started by redwraith, Mar 21, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,
    I'm not currently a client of discountAsp.net but I am looking for a Web Host and this looks like a great place.

    I'm currently building a website that will have potentially have thousands of images uploaded to it. All images are being saved in the database and none are saved in folders. Is anyone that has a site similar to mine using this approach or are all your images stored in folders? The reason I'm asking is that I noticed the pricing for database storage space and 30$/500MB can get pricey very quickly if images are stored in the db.

    How much of a performance hit could I expect if I decide to store the images in folders instead of the db? This is a site where subscribers upload their own images.

    Thanks a lot guys!

    HL /emoticons/smurf.gif
     
  2. It is a lot better overall to host your images in folders and link them in your Database as needed rather than storing them as big fat binary objects in the DB then needed to access those files and the required links from the DB, which is a rather bloated method.


    For a good example of this method take a look at any of the free forums that use SQL Databases.
    Look how they link to the images, which are in folders.
    It's a much quicker and more robust method.
     
  3. Storing images in a file system is a better choice with respect to system performance .Storing them in a DB may result in an increase in query response time and offcourse space would be an issue too ,specially with thousands of images.Just storing their relative links is a good idea.You can load them directly from the stored links.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page