You are here: Re: Storing images instead of image paths in DB « PHP Programming Language « IT news, forums, messages
Re: Storing images instead of image paths in DB

Posted by Andy Hassall on 08/05/05 01:32

On Thu, 04 Aug 2005 23:54:11 +0300, Alexey Kulentsov <crimaniak@crimaniak.com>
wrote:

>> The other alternative would be to store the images in the database.
>Never store image in database. Database can't index images so you have
>no any reason to store it in SQL server.

Untrue - two clear advantages are:

(1) The image data is under the same transactional control as the rest of the
data. If your server crashes, then you don't have any guarantee that the
filesystem is in sync with the database any more. And you can't ROLLBACK a
filesystem change.

(2) Having the images in the database means you only have to backup one thing,
and similar to (1) you know that your image data is referentially correct
compared with the rest of the data.

There are disadvantages to storing image data in the database, some of which
can be alleviated with caching in the filesystem, but to say there is no reason
to store images in the database is not true.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация