store image in DB or in file

Discussion in 'ASP .Net' started by clark, Jul 29, 2003.

  1. clark

    clark Guest

    I have an app that needs to upload images for each active
    member. Which is the best approach?
    1. to store the img directly in SQL Server database
    or
    2. to store path/filename in db and put file on server

    volume is potentially 10,000+ images
    clark, Jul 29, 2003
    #1
    1. Advertising

  2. The answer is "it depends."
    It depends on all kinds of things such as hardware, infrastructure, number
    of users, peak loads, scalability requirements, etc.
    Certainly storing the files in SQL Server is easier because you don't have
    to worry about file management issues, such as naming conflicts, and files
    being deleted, moved, etc.
    Here's a good tutorial on the subject for you:
    http://www.aspnetpro.com/features/2003/07/asp200307so_f/asp200307so_f.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "clark" <> wrote in message
    news:024f01c35606$d96c6ce0$...
    > I have an app that needs to upload images for each active
    > member. Which is the best approach?
    > 1. to store the img directly in SQL Server database
    > or
    > 2. to store path/filename in db and put file on server
    >
    > volume is potentially 10,000+ images
    Steve C. Orr, MCSD, Jul 29, 2003
    #2
    1. Advertising

  3. This is true to some extent.
    But keep in mind that Microsoft's next Windows file system is based on SQL
    Server.
    So soon you'll essentially be storing all your files in SQL Server whether
    you want to or not.

    Even so, the decision still basically comes down to App Performance vs.
    Development Time.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "Kevin Spencer" <> wrote in message
    news:%23L2$...
    > Storing in the file system will be less costly, as storing and retrieving
    > binary data from a SQL Server is much more costly in terms of performance
    > than storing and fetching files from the file system.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > http://www.takempis.com
    > Complex things are made up of
    > lots of simple things.
    >
    > "clark" <> wrote in message
    > news:024f01c35606$d96c6ce0$...
    > > I have an app that needs to upload images for each active
    > > member. Which is the best approach?
    > > 1. to store the img directly in SQL Server database
    > > or
    > > 2. to store path/filename in db and put file on server
    > >
    > > volume is potentially 10,000+ images

    >
    >
    Steve C. Orr, MCSD, Jul 30, 2003
    #3
  4. clark

    CT Guest

    I agree with your view points, but while waiting for Yukon I think that
    because of SQL Servers rather poor BLOB handling, storing images in the file
    system is by far the most efficient.

    --
    Carsten Thomsen
    Enterprise Development with Visual Studio .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Steve C. Orr, MCSD" <> wrote in message
    news:%...
    > This is true to some extent.
    > But keep in mind that Microsoft's next Windows file system is based on SQL
    > Server.
    > So soon you'll essentially be storing all your files in SQL Server whether
    > you want to or not.
    >
    > Even so, the decision still basically comes down to App Performance vs.
    > Development Time.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > http://Steve.Orr.net
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:%23L2$...
    > > Storing in the file system will be less costly, as storing and

    retrieving
    > > binary data from a SQL Server is much more costly in terms of

    performance
    > > than storing and fetching files from the file system.
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > .Net Developer
    > > http://www.takempis.com
    > > Complex things are made up of
    > > lots of simple things.
    > >
    > > "clark" <> wrote in message
    > > news:024f01c35606$d96c6ce0$...
    > > > I have an app that needs to upload images for each active
    > > > member. Which is the best approach?
    > > > 1. to store the img directly in SQL Server database
    > > > or
    > > > 2. to store path/filename in db and put file on server
    > > >
    > > > volume is potentially 10,000+ images

    > >
    > >

    >
    >
    CT, Jul 31, 2003
    #4
  5. clark

    CT Guest

    That can certainly be an issue, so you have to choose between two
    evils...<g>

    --
    Carsten Thomsen
    Enterprise Development with Visual Studio .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Ray Dixon [MVP]" <> wrote in message
    news:...
    > Keep in mind you will have to deal with the possibility (probability?) of
    > duplicate file names if you store the files in the file system. In a SQL
    > DB, you wouldn't have that issue.
    >
    > My $.02.
    >
    >
    > --
    > Ray Dixon - Microsoft MVP
    >
    > (remove NOSPAM. from my e-mail address for a direct reply)
    >
    >
    > "CT" <> wrote in message
    > news:...
    > > I agree with your view points, but while waiting for Yukon I think that
    > > because of SQL Servers rather poor BLOB handling, storing images in the

    > file
    > > system is by far the most efficient.
    > >
    > > --
    > > Carsten Thomsen
    > > Enterprise Development with Visual Studio .NET, UML, and MSF
    > > http://www.apress.com/book/bookDisplay.html?bID=105
    > > "Steve C. Orr, MCSD" <> wrote in message
    > > news:%...
    > > > This is true to some extent.
    > > > But keep in mind that Microsoft's next Windows file system is based on

    > SQL
    > > > Server.
    > > > So soon you'll essentially be storing all your files in SQL Server

    > whether
    > > > you want to or not.
    > > >
    > > > Even so, the decision still basically comes down to App Performance

    vs.
    > > > Development Time.
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD
    > > > http://Steve.Orr.net
    > > >
    > > >
    > > > "Kevin Spencer" <> wrote in message
    > > > news:%23L2$...
    > > > > Storing in the file system will be less costly, as storing and

    > > retrieving
    > > > > binary data from a SQL Server is much more costly in terms of

    > > performance
    > > > > than storing and fetching files from the file system.
    > > > >
    > > > > --
    > > > > HTH,
    > > > >
    > > > > Kevin Spencer
    > > > > Microsoft MVP
    > > > > .Net Developer
    > > > > http://www.takempis.com
    > > > > Complex things are made up of
    > > > > lots of simple things.
    > > > >
    > > > > "clark" <> wrote in message
    > > > > news:024f01c35606$d96c6ce0$...
    > > > > > I have an app that needs to upload images for each active
    > > > > > member. Which is the best approach?
    > > > > > 1. to store the img directly in SQL Server database
    > > > > > or
    > > > > > 2. to store path/filename in db and put file on server
    > > > > >
    > > > > > volume is potentially 10,000+ images
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    CT, Aug 1, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Hammond
    Replies:
    2
    Views:
    1,181
    Jim Hammond
    Nov 12, 2003
  2. angus
    Replies:
    2
    Views:
    460
    Elliot M. Rodriguez, MCSD
    May 20, 2004
  3. =?Utf-8?B?UnVkeQ==?=

    to store or not to store an image

    =?Utf-8?B?UnVkeQ==?=, Mar 29, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    612
    =?Utf-8?B?UnVkeQ==?=
    Mar 30, 2005
  4. Laszlo Zsolt Nagy
    Replies:
    1
    Views:
    1,237
    Kartic
    Jan 26, 2005
  5. Jack
    Replies:
    2
    Views:
    196
    John W. Krahn
    Jan 25, 2008
Loading...

Share This Page