Let me add my $.02

CHP> A) There's no *point* in keeping the image in the database.
CHP> A DBMS is all about searching, comparing, relations, etc. You
CHP> get *none* of these by storing the image data in the DB.

Sometimes it just easier to store all things in same place. Right now
I working on one web project where there is exist notion of user
profiles. User can edit various fields and upload his/her
pictures. Right now it is implemented in 'right' way. I.e. database
stores only pathnames of files. But I thinking to rewrite it and store
pictures in database to simplify my code.

CHP> B) Unless you're careful, you totally defeat both the
CHP> web servers and the clients ability to make use of caching
CHP> mechanisms. While you may not see a big difference on the
CHP> server, it can make one h... of a difference to the user
CHP> stuck behind a 33.6K modem.

It is not that hard. Code which takes images from database should
generate headers like Last-Modified and so on. Often web server works
together with proxy working in web accelerate mode. In such case
images will be served from database only on first hit and all next
requests will be served from proxy cache. Such approach removes
unnecessary load from database and gives speed of static data
requests.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to