Adding an image to a database table?
Moderator: General Moderators
Adding an image to a database table?
Can someone please tell me what data type I should use to add an image to a database? Thanks in advance.
Re: Adding an image to a database table?
Images in databases, are NOT recommended, and I'm pretty sure its Blob, if you still continue on with it...cturner wrote:Can someone please tell me what data type I should use to add an image to a database? Thanks in advance.
-NSF
Why? its been said many times, and instead of explaining again.....cturner wrote:Why aren't images in databases recommended? How can I show an image for each product when there are a lot of images to be displayed? I have tried BLOB and nothing is displaying.
viewtopic.php?t=46301&highlight=image+database
viewtopic.php?t=37077feyd wrote: But it is not recommended. Why? In order to display the image, you'll have to make a reference to a PHP script as the image. This reference will need to query and extract the binary data from the database server. This causes more server load than is necessary. Instead, it is often suggested to use the filesystem to store the files. That's what it's built for.
If you want to read previous threads on this, use the search *blob* as the keyword string (with the both asterix)
-NSF
Our software vendor has decided to store images inside the database. The 270,000 images consume 72 gigs. When this file changes, the whole file needs to be backed up and 3 days of backups are stored. If the vendor had decided to store images on the filesystem, then incremental backups would be much easier as the database would be much smaller in size. I hope this database file never get corrupted. 
-John
-John