List Info

Thread: File storage vs DB storage.




File storage vs DB storage.
user name
2007-04-10 02:26:03
Hello all,

Im a newbie and am currently going through the Python Tutorial for the second time. At work, i use C#, but what a delight Python is!

Ok, to get to the point: when building a web app that should store an retrieve photos, what would be more efficient between the app storing the files on a local hard disk, or saving blobs/ binary data to a database? Someone toldme that database storage should be avoided as it would cause a botleneck, whereas i dont want to imagine the nightmare of managing tons of files sitting in a folder. I use Windows XP.


Cheers,

--
"The Stupidry Foundry"
Re: File storage vs DB storage.
country flaguser name
United Kingdom
2007-04-10 05:10:05
"OkaMthembo" <zebra05gmail.com> wrote

> Ok, to get to the point: when building a web app that
should store 
> an
> retrieve photos, what would be more efficient between
the app 
> storing the
> files on a local hard disk, or saving blobs/ binary
data to a 
> database?
> Someone toldme that database storage should be avoided
as it
> would cause a botleneck,

I wouldn't say a bottleneck but it can cause problems by
making the database itself very big. That can cause
problems for some operations, including admin tasks.
Some databases work better with blobs than others.

> whereas i dont want to imagine the nightmare of
managing
> tons of files sitting in a folder. I use Windows XP.

Naming issues are usually the biggest problem.
It will work best if you use a numrerical naming convention
and manage all of the meta data in the database, along
with the filename.

The advantage of using the file system is that you can
use different folders to help organise the files - folders
for
month created or submitter or whatever. Also you can
use the facilities of the OS to create encrypted folders,
secure folders, compressed folders, move the folders
onto other drives as the capacity expands, do incremental
backups etc etc.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://ww
w.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutorpython.org
http://
mail.python.org/mailman/listinfo/tutor

Re: File storage vs DB storage.
user name
2007-04-11 02:39:06
Thanks, gentlemen.

Indeed, using directories may be a better bet when there are many files involved. At least, this has been my feeling, and i gather the same from your replies.

I'll be using Lighttpd + FastCGI + Python + MySQL (maybe PostGRE here) on Win. XP SP2. Any known caveats of this combo before i plunge?

Thanks again

Lloyd

On 4/10/07, Alan Gauld < alan.gauldbtinternet.com">alan.gauldbtinternet.com> wrote:
"OkaMthembo"; < zebra05gmail.com">zebra05gmail.com> wrote

&gt; Ok, to get to the point: when building a web app that should store
> an
> retrieve photos, what would be more efficient between the app
> storing the
> files on a local hard disk, or saving blobs/ binary data to a
> database?
> Someone toldme that database storage should be avoided as it
> would cause a botleneck,

I wouldn';t say a bottleneck but it can cause problems by
making the database itself very big. That can cause
problems for some operations, including admin tasks.
Some databases work better with blobs than others.

&gt; whereas i dont want to imagine the nightmare of managing
&gt; tons of files sitting in a folder. I use Windows XP.

Naming issues are usually the biggest problem.
It will work best if you use a numrerical naming convention
and manage all of the meta data in the database, along
with the filename.

The advantage of using the file system is that you can
use different folders to help organise the files - folders for
month created or submitter or whatever. Also you can
use the facilities of the OS to create encrypted folders,
secure folders, compressed folders, move the folders
onto other drives as the capacity expands, do incremental
backups etc etc.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld


_______________________________________________
Tutor maillist&nbsp; -  ; Tutorpython.org">Tutorpython.org
http://mail.python.org/mailman/listinfo/tutor



--
"The Stupidry Foundry&quot;
Re: File storage vs DB storage.
country flaguser name
United Kingdom
2007-04-11 08:10:32
"OkaMthembo" <zebra05gmail.com> wrote

> I'll be using Lighttpd + FastCGI + Python + MySQL on
> Win. XP SP2. Any known caveats of this combo 
> before i plunge?

That should be fine I think.

Alan G.

_______________________________________________
Tutor maillist  -  Tutorpython.org
http://
mail.python.org/mailman/listinfo/tutor

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )