|
Posted by Stefan Rybacki on 10/14/05 22:01
NC wrote:
> 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...
>
Not at all. Get all images from the database with one query and store them in a session or
something similar and load it from their.
Anyway I don't like to save picture in the database.
Regards
Stefan
>
> 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]
|