Re: Re: how to display images stored in DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-02-28 at 17:04 -0500, Mark wrote:
> Kevin Waterson wrote:
> 
> > This one time, at band camp, zerof <zerof@xxxxxxxxxxxx> wrote:
> > 
> >> It is not a good practice to store pictures in DataBases, use links,
> >> instead of.
> > 
> > Rubbish, where are your benchmarks?
> 
> It has almost nothing to do with benchmarks.
> 
> Images are typically best supported in the form of files. They are more
> easily manipulated by external tools. 
> 
> The web browser sees an image as a single HTTP request. Invoking the PHP
> script engine, parsing the script, and executing a SQL query to retrieve
> the image from the database is less efficient than letting the web server
> just send the file.
> 
> Image files do not need to be constrained by the rigid requirements of a
> relational database.
> 
> I could go on, but it should be clear enough that putting images in a
> database is not a good idea.

What about when you need to share those files across a 50 node network?
I'd keep it in a database, then when I need it cache a local copy on the
filesystem. Then I can just check the timestamp in the database to see
if the file has changed. Voila, multi-node high availability images.

Seems better than have a local copy of every single image. I guess the
answer is... it depends on what you're doing!

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux