Re: image thumbnail from blob data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 06, 2010 at 09:55:20PM +0100, Ashley Sheridan wrote:

<snip>

> 
> Having said that, it's not generally a good idea to store images as
> blobs in my experience. It can create slowdowns in database access, and
> increases the amount of space the db requires by a lot! What most people
> do I've found is to store the image as a file and store the path and
> filename to it in the db. However, if the location is going to change
> often then it might be best to store it as a blob like you're doing.
> 

+1

Storing blobs in an RDBMS is an abuse of the technology, IMO. RDBMSes
were not originally designed to store this type of information, and as
Ash pointed out, it still can create problems. His assessment of the
preferred method for storing this type of information is spot on. Store
them in a file and then store the file location in your database.

I don't know, but this might be use case for the new generation of NoSQL
databases. I have very little knowledge of how they store data, but I
would assume they're more accustomed to storing blobs and whole
documents. And if not, then someone should come up with one which works
this way. It would be relatively simple to create a key-locaton table
(using dbm or somesuch) and have all the actual "data" stored in files.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux