--- Pete <[EMAIL PROTECTED]> wrote: > In my experience, it also becomes extremely difficult to back up the > databases, as they become so large. > > I understand that some people do it that way, to avoid pictures being > leeched, but it's not the way that I would do it. > > -- > Pete Clark
There are some good ways to prevent this. As mentioned in a recent thread, one can place the image files in a directory which the web server cannot access. Since PHP can access the entire filesystem (subject to permission restraints) an image handler script can reach into that directory and stream the image data. The script can also ensure that the user is logged in and does not exceed download maximums. However, for beginners, I highly advocate storing data in the database and files in the filesystem. Each is optimized for that sort of content. The exceptions are specialized cases such as a primary-secondary node MySQL system on multiple servers. Even here I would look seriously at NFS or a similar filesystem sharing mechanism. When you store binary data of any kind in a MySQL table queries like this: SELECT * FROM tablename; can become nontrivial from a performance standpoint. I suspect the reason we see a lot of this is that single-user desktop databases will store images in the table. It takes people a little time and introduction to the notions of server-side programming and client-server relations as they apply to the browser-webserver and database. James James