tedd wrote:
At 5:12 PM -0600 2/27/07, Richard Lynch wrote:
Personally, I think your first mistake was putting the image into the
DB at all.
Unless you're the CIA doing pixel comparisons actually in SQL stored
procedures or something. :-)
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.
Furthermore, I have yet to talk with a single MySQL expert nor read a
single MySQL book that claims what you claim. Could you be mistaken?
Perhaps you might rethink your position. You know, we all learn -- I do
everyday.
Like Rob said in a different thread, it depends on what you're doing.
If you're pulling out the image every single time from the db - that's
bad - because your browser will never be able to cache it and you're
putting more strain on the server because it will have to fetch the
image from the database every single page request.
If you're storing it in the db and creating a local cache copy which can
be expired (through cron or some other means), that's good. You're
reducing server load by having the local copy and have the advantage of
replication in the database to distribute the image around.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php