Files from db vs. filesystem (was MySql or flat database using PHP)

From: Date: Sun, 19 Aug 2001 08:55:22 +0000
Subject: Files from db vs. filesystem (was MySql or flat database using PHP)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-63370@lists.php.net to get a copy of this message
Andrew/All, Following on from this I am interested to find out some performance comparisons/opinions of storing files in a db vs. storing in the file system and being redirected by php I think I've heard from elsewhere that file system is more effecient. The sistuation.... storing is pretty much a "one-off" activity, but accesses will be frequent. Files are small, ranging from 30k to 250k. Anyone have any comments/benchmarks? My attempts at testing the two have been sloppy to say the least. TIA, Tom ----- Original Message ----- From: "Andrew Libby" <alibby@commnav.com> To: "David Ovens" <DOvens@doweb.co.uk> Cc: <php-general@lists.php.net> Sent: Sunday, August 19, 2001 3:20 AM Subject: Re: [PHP] MySql or flat database using PHP ? > > Dave, > IMHO, a major consideration for Web apps is contention and s > synchronization. If you intend to allow users to update > data on in the app it becomes important to coordinate writes > (with locking) so that no two users can write to the same (region) > of the file at the same time. An RDBMS (MySQL, PostgreSQL) or a directory > (OpenLDAP) takes care of this (as well as many other problems > with data storage and retrieval). I agree with the other statements I've > seen here, but wanted to add this as well. I've done it both ways > and the DBMS, Directory route tends to be a better solution. This is > code reuse of the best kind. > > My humble $0.02. > > Andy > > > On Sat, Aug 18, 2001 at 09:29:56PM +0100, David Ovens wrote: > > Before I start creating an Sql table/database, thought I would ask for advice first. > > > > I am creating a directory online, with urls information, links, email addresses etc etc. What do you think is best a MySql database or writing it to a file using fopen/fwrite (flat file) ??? Your thoughts would be very much appreciated. > > > > > > Thanks > > > > Dave > > > > > > > > -- > -------------------------------------------------- > Andrew Libby > Director of Technology > CommNav, Inc > alibby@commnav.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#63370) next »