Galen wrote:

I tend to disagree. Images in the database, providing they actually associate with other bits of info, are great. I usually keep images in a separate table than the data, but it's really easy to keep track of everything. No file permissions, backup is as easy as standard SQL backups, etc. I my experience, it's a LOT easier to keep track of stuff in the database than the filesystem, especially when it comes to moving from box to box. There may also be some security advantages, too, as the data is not actually stored in the filesystem and couldn't possibly be executed or otherwise accessed by someone without database access privileges.

As far as it being slow, well, not terribly as long as your files don't balloon too large, especially considering all the stuff you might be doing with the disk. If you store images that are played with a lot on the disk, it'll likely be slower than MySQL due to MySQL having better caching. (I have actually shown this on some of my projects that work with a lot of images that are worked with quite a bit).

If your site is going to be high volume traffic, implement some sort of caching routine for your images. You'll get the convenience of database and the performance boost of caching, and as always, if the cache fails, just hit the database for the information.

For your needs, give it a try. I doubt you'll have performance problems, and you can always switch back to the filesystem if you do have troubles.

-Galen

If you are going to be passing images

On Dec 10, 2003, at 10:32 AM, Adam i Agnieszka Gasiorowski FNORD wrote:

Derrick Fogle wrote:

I've read that, given the choice, you should never store images in a
database because it makes the database dog slow. But I've got some
parameters and issues that might make a difference:


    We (at hyperreal.info) are storing all the
 images attached to articles in the database and
 all the structural images (belonging to design)
 in files on filesystem (in CVS). There are no
 problems and backups are much easier...The server
 runs on LAMP.

--
Seks, seksiÄ, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info  { iWanToDie }   WiNoNa    )   (
http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
Poznaj jej zwiewne ksztaÅty... http://www.opera.com 007

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





I agree, storing images in the database can be a big help.


For caching, you may want to try PEAR's Cache package.

--
paperCrane <Justin Patrin>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to