Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / October 2004

Tip: Looking for answers? Try searching our database.

file upload storage - database vs folder

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
R Reyes - 26 Oct 2004 00:23 GMT
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.
Henrik Nordgren - 26 Oct 2004 13:31 GMT
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

> 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
[quoted text clipped - 6 lines]
>
> ideas and comments please?  thanks.
R Reyes - 26 Oct 2004 17:59 GMT
ok, but what if i plan to look at the files a lot (which are mostly images)?  
this code is for a personal site (not a production) and i like to see the
image files every now and then (for whatever reason).  is it hard to view
files manually or must i run some code to parse from the database just to
view these files all the time?  if there's a way for the database to show me
the pictures w/o me having to run code that would be great!

thanks for your help it's most appreciated.

> I have used both techniques whilst working with oracle database.
>
[quoted text clipped - 26 lines]
> >
> > ideas and comments please?  thanks.
Angelos Karantzalis - 27 Oct 2004 09:29 GMT
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:]

> I have used both techniques whilst working with oracle database.
>
[quoted text clipped - 26 lines]
> >
> > ideas and comments please?  thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.