Reply to Re: Is it better to save upload photo on the hard drive or in the database?

Your name:

Reply:


Posted by NC on 10/14/05 21:57

Nicholas wrote:
>
> I wondered what the best solution is: save uploaded photos as "BLOBs" in the
> database itself (in my case MySQL) so that, except for the tmp folder, I
> don't have to give write access, or on the hard drive to make it easy on the
> database server?
>
> Seems to me that it's cleaner to save photos in the database itself.

There is a tradeoff here. If you save images in the database, back-up
and other maintemence tasks will be greatly simplified. However, if
you do that, the performance of your application may suffer. To
retrieve
an image from the database, you need a separate script with a separate
connection. So if you have a page with five images on it, an attempt
to
view that page will initiate six simultaneous connections to the
database,
one from the script itself, and five more from image display scripts...


One of these days, when all browsers start understanding <img
src="data:*">
tag, this may become moot point, but so far we are not quite there...

Cheers,
NC

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация