>    From: Jeromie Clark <[EMAIL PROTECTED]>
>
> I'm not saying that other approaches aren't valid -- but  I do know
> first-hand that this approach works in a large-scale installation.

Sorry, I did not mean to imply you didn't know what you were doing --  
just that you were only representing one side of the argument!

I do not have current experience with such huge systems. I did,  
however, benchmark smallish images from both the file system and from  
MySQL, and in no case did I see more than a 10% performance hit. In  
many cases, the performance hit was "in the noise" -- the average  
difference between the middle three of five trials was less than the  
difference between trials of the same method.

People who laud serving images from a filesystem generally tout  
performance while glossing over practical concerns and potential  
problems, such as files getting lost or having permissions changed,  
either of which can happen when restoring a backup or if multiple  
people have access.

Personally, I also think the code is cleaner and more easily  
understood -- it sure is easier to encapsulate if you don't have  
implementation details "leaking" into the file system! From a  
cohesion and coupling point of view, images in the actual record are  
closer to "normal form" than having references to files, which  
essentially represents a de-normalization of the design. Certainly,  
if you ever have to move the entire thing, having one database is a  
joy, compared to hunting down various bits and pieces. (And for any  
largish file-based design, there will be many directories and  
complicated hashing to keep track of them -- keeping gazillions of  
images in one directory is CERTAINLY a performance disaster!)

Images in files make sense for a lot of people -- perhaps most of  
them! I only objected to the "it's been discussed many times" with  
the implied consensus that images in files are universally "better"  
in all possible situations.

:::: We need an energy policy that encourages consumption. -- George  
W. Bush
:::: Jan Steinman <http://www.Bytesmiths.com/Item/99BD07>




The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to