Re: file upload storage - database vs folder

From: Angelos Karantzalis (akarantzalis_at_agiltech.gr)
Date: 10/27/04


Date: Wed, 27 Oct 2004 11:29:37 +0300

This has been the topic of many discussions amongst many web people :]

One question though. Suppose I do store my images for a web site in a BLOB
inside my DB. When I get a request for a web page that contains a few
images, don't I need to point the client browser somewhere to fetch those
files ? Won't I be forced to create a page (script, HttpHandler, call it
what you want ) that returns the image data from the database with the
proper header/content type info ? Isn't this overkill in the case you just
need to display a pic on a web site ?

Angel
O:]

"Henrik Nordgren" <HenrikNordgren@discussions.microsoft.com> wrote in
message news:6676345C-B176-4221-8C13-E2634CBE4BAB@microsoft.com...
> I have used both techniques whilst working with oracle database.
>
> And it all comes down to the scenario. But generally I want to keep my
data
> in as few places as possible, for security reasons, and for availability
> reasons. And it is nothing complicated about storing a binary file in a
BLOB
> field in the database. You can still read it while working with datasets..
it
> is serialized and encoded using Base64. And I do't like to store paths in
> database, becuase then you create a depencence between the file system and
> the application. And this is not good from an architectural point of view.
>
> Of course when you need a third party application to access the file, then
> perhaps the best choice would be to store the file in a shared folder. If
it
> can't be solved in any other way.. I always consider file systems as a
last
> resort...
>
> but thats just me ;) Im no MVP or MCAD...
>
> kind regards
> Henrik
>
>
> "R Reyes" wrote:
>
> > what are the pros/cons of uploading a file into a database (like access,
sql
> > server, oracle) vs. uploading a file into a folder (and only storing its
path
> > in a database table) ?
> >
> > i've never had to upload a file into a database and am assuming it's
easier
> > to just put files in a folder with its path stored in the database.
storing
> > a file in the database seems like a bit more work and is just "another
> > solution" rather than a recommended one.
> >
> > ideas and comments please? thanks.



Relevant Pages

  • Re: Storing images in postgreSQL (with PHP)
    ... > I am wanting to learn how to store images in a postgreSQL database. ... Some code to load a picture might be: ...
    (comp.lang.php)
  • Re: storing path only to database
    ... Do not store the images in the file, rather store them on the hard drive and ... store the path to them in the Access database. ... Alternatively, you can store images in multiple tables, each one of which is ... Dim MyFolder As String ...
    (microsoft.public.access.formscoding)
  • Save Information to DB at Crawling
    ... I am trying to make a crawling program to grab information and store them ... The web site is structured as following. ... my crawler is going to each property page using regular ... I have problem to decide when and where I can save it to database. ...
    (comp.databases.oracle.server)
  • Re: Image problem
    ... This sounds like one of the symptoms of hitting the database size limit? ... Using Photo Editor to store JPEGs causes a huge overhead, since it stores each image uncompressed, then ... Either store the images externally as files, or as blobs if you want them in the database. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: [SLE] File Server
    ... >>store the images in the file system directly? ... > future if for some reason you are adding more weight images, ... Even in Oracle this is a really bad idea. ... before you store the body in the database. ...
    (SuSE)