|
Posted by Jerry Stuckle on 12/13/06 12:07
seaside wrote:
> eholz1 schrieb:
>
>
>>Hello PHP group,
>>
>>I looks like this is a good forum to ask my question. I am using both
>>PHP and MySQL.
>>I would like/am designing a photo database for the web - not heavy duty
>>- not complex, like menalto Gallery, etc. My idea is to use PHP and
>>MySQL. I would like to store the images in the MySQL database, and
>>display them using PHP.
>
>
> I wonder, if storing images in a MySQL DB is a wise choice.
>
> Why not generate a unique/random name for each image and store a
> reference to these names in an SQL table?
>
> Are there are good reasons, to transfer the whole images through your
> MySQL connections and make table rows large?
>
Actually, quite a few reasons. Makes backups easier, ensures your
database remains consistent, you don't need to keep track of thousands
of images in one directory, no worries about name collisions, remote
access...
I can keep going.
It won't take any longer to transfer the image through the MySQL
connection if you're on the same server, and probably less time than
establishing a new connection to download the file if both were on a
different system. And table rows will be larger - but you'll still have
to take up that space in the file system, anyway.
I find storing images in the database can be very effective.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|