1 Mar 2007 01:41
Re: Re: how to display images stored in DB
Robert Cummings <robert <at> interjinn.com>
2007-03-01 00:41:19 GMT
2007-03-01 00:41:19 GMT
On Wed, 2007-02-28 at 17:04 -0500, Mark wrote: > Kevin Waterson wrote: > > > This one time, at band camp, zerof <zerof <at> terra.com.br> 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.(Continue reading)
>
> Richard:
>
> I highly respect your opinion and on this list you provide tremendous
> help -- however -- I must disagree with you about storing images in
> dB's. Both techniques (using dB or the file system) have their up-sides
> and down-sides and neither have anything to do about CIA pixel comparisons?
>
> This idea of CIA pixel comparisons has been brought up before and it's
> pointless. There is no way for anyone to do a pixel search in MySQL.
> Images are not text and thus can't be subject to a "full text" like
> search. There are no functions in MySQL that will permit pixel searches
> AND that isn't important anyway -- not everything stored in a dB has to
> be search-able. That's not a requirement for entry!
>
> When someone uses a dB for storing images, that's what they are doing --
> storing. I never store images without other data, like image type, size,
> description and such. So, why would I want to separate out that single
> attribute from a record and store that in a remote file system when I
> could just as easily store it in a dB? It's like saying "Never use css
> to display an image, only use html" when both work well under different
> needs.
>
RSS Feed