Re: How to store picture (*.jpg, *.bmp, *.gif) into sql database ?

From: Shan Plourde (------_at_---.net)
Date: 07/27/04


Date: Tue, 27 Jul 2004 04:20:27 GMT

I'm for storing files on the file system. Some of my cons are below.
There are many others and pros for doing what you're doing, and these
items could be argued, but these are my 2 cents on why I would not store
files in a database. Others would definitely have different opinions,
I'm not sure what people with clustered .NET servers would recommend for
example. Perhaps their arguments would weigh in favour of what you're
doing. My perspective is from the simple .NET server and DB server
architecture.

1. No need for large files to be processed through .NET process space.
If you store files in your database, the files must be streamed through
the .NET framework before being returned to clients - definitely unnecessary
2. More network bandwidth consumed between your .NET application server
and DB server if they are separate machines; greater network scalability
3. Limited indexing for searching purposes versus externalized files
with external file indexing / searching tools
4. No capability to manually examine a file without programmatically
retrieving the file from the database first - can be an inconvenience
when it is necessary to do so, perhaps for support and maintenance or
debugging purposes
5. More database expertise required to effectively partition database to
support files versus simply storing on filesystem - perhaps could impact
performance of your database if not done well

Shan

Tampa .NET Koder wrote:

>I always wondered about this. I have tried storeing images in a database
>and I think is kool since the data can be managed a whole lot easier.
>Storeing the path in the DB is ok but you have to manage the data in the DB
>and on the filesystem. Does anyone else have an opinion on this?
>
>Tampa .NET Koder
>
>
>
>"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
>news:e%2370w63cEHA.3632@TK2MSFTNGP09.phx.gbl...
>
>
>>use the Image datatype, BUT... if you can, try just storing them on the
>>FileSystem and storing a path/name in the DB. Better/easier to deal with.
>>
>>--
>>Curt Christianson
>>Owner/Lead Developer, DF-Software
>>Site: http://www.Darkfalz.com
>>Blog: http://blog.Darkfalz.com
>>
>>
>>"Daniel" <Daniel@discussions.microsoft.com> wrote in message
>>news:4A4D189A-BE45-4AA8-BB5A-EED5BF905A87@microsoft.com...
>>
>>
>>>Does anyone know how to solve the above solution using ASP.net language.
>>>
>>>Thanks in advance.
>>>
>>>
>>
>>
>
>
>
>



Relevant Pages

  • Re: Image Question
    ... the database though... ... and "uploading" it to the server. ... > guy was storing 20,000 video files? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Image Question
    ... > the database though... ... the advantages might be for storing them in the database. ... > somewhere on the server that had its record deleted). ... You gave "reasons" and so many times people just ...
    (microsoft.public.dotnet.languages.vb)
  • mysql as a file upload/download vector
    ... mysql server with the 'test' database still available can be used as a ... I mean storing the file data in a database. ... technology powered by the award-winning FoundScan engine. ...
    (Pen-Test)
  • Re: Image Question
    ... > the advantages might be for storing them in the database ... The same way he gets 10,000 records in the database to point to the correct ... The solution I implemented stored the documents on a server. ... > an image is sitting in folder... ...
    (microsoft.public.dotnet.languages.vb)
  • Create SharePoint Portal failed.
    ... One mentioned ensuring that SQL Server uses a case ... 13:55:40 Service database server is 'USDC-JOHRIV'. ... Update dbo.propertylist set DisplayName = N'Last name' ...
    (microsoft.public.sharepoint.portalserver)