|
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
Navigation:
[Reply to this message]
|