[Tutor] File storage vs DB storage.

OkaMthembo zebra05 at gmail.com
Wed Apr 11 09:39:06 CEST 2007


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.gauld at btinternet.com> wrote:
>
> "OkaMthembo" <zebra05 at gmail.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://www.freenetpages.co.uk/hp/alan.gauld
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
"The Stupidry Foundry"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070411/2358c6c4/attachment.htm 


More information about the Tutor mailing list