[UPHPU] Storing images in DB
Fred Larsen
fred at bitwyze.com
Tue May 25 12:52:58 MDT 2004
On Tue, 25 May 2004, Ray Hunter wrote:
> On Tue, 2004-05-25 at 10:58, Daniel Crookston wrote:
> > An article on why this isn't necessarily a good idea:
> > http://www.yapf.net/faq.php?cmd=100&itemid=22
> >
> > > Have you considered storing the image in the database? This helps with
> > > data portability and some security issues. You would want a blob field
> > > to store an image.
>
> Not to mention you can have forms of data corruption that i have seen in
> the past. At one job we went down this road and it was extremely
> painful. We had the image in various sizes in the database, however, it
> turned out that by using php and converting on the fly was the simple
> solution. One thing that we did add to the mix was a dedicated image
> server that served up the images. We used a small web server to do that.
>
> Also I would suggest looking at what file system type you have and which
> would be the best for your set up. I tend to use reiserfs a lot for the
> stability.
>
I will second the file system type advise. We have a dedicated photo
server that handles all of the photo processing as well as serving the
photos. We ran into a little problem just last week because we have over
300,000 images in one directory on a extended 3 file system.
To make a long story short. The file system choked and the server went
down. When the server came back up we had more than a couple inodes that
were lost. I think reiserfs is in our very near future.
Fred
More information about the UPHPU
mailing list