The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End saving images into database or save the address of the image

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #205884

    Hello guys
    i’m wondering if my subject was cleared enough , i’m standing between two roads , why should i save the image into blob type if i can save the image address instead of that , and retrive the image by using it’s address which has been saved in the database .
    can any one tell me which one i should use to save my images into a database .


    What does that mean string of text ?
    what i wanted is to know which way is better storing the image address or the image itself into database ? which is better and why ?


    I am admittedly a little confused by the wording of this question, but I’ll do my best to answer what I think you want.

    The general consensus seems to be that you should store the filepaths in the DB (database) as opposed to the file itself. This is because if you were to directly store those files in a DB (blobs if you will), then you’ll risk bloating the site. The more bloated things get, the more they’ll start to fall apart: performance loss, slower queries, as well as a larger backup copy… which also means greater difficulty with tasks like a complete redesign (i.e. bringing the site down to a local server). Storing the files directly in the DB also implies risk of losing everything in the rare, ungodly circumstance where you tables get corrupted (thankfully haven’t been there yet).

    I came across a pretty good rule of thumb once: “store text in databases – nothing binary.” Anything that will help boost performance is going to be extremely beneficial across many dimensions for a website. And as most will vouch, site performance is crucial, especially when taking the mere fact that you have only seconds to serve up a copy before the average visitor gives up and turns around.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.