MySQL and Images [modified] - RESOLVED
-
I'm generally familiar with SQL Server 2005 and I know there's an IMAGE data type that I can use to store pictures in the db. Can MySQL do the same? I'll be heading to the book store tomorrow to pick up a book and read up on this, but any experience in this area, particularly including taking pictures that are saved on my local disk and storing them in a web-based MySQL db would be greatly appreciated. I've seen sample apps for SQL Server 2005 that do this, but not MySQL and get the impression it's not nearly as easy, but probably possible. Thanks!!
modified on Monday, December 24, 2007 10:29:00 PM
-
I'm generally familiar with SQL Server 2005 and I know there's an IMAGE data type that I can use to store pictures in the db. Can MySQL do the same? I'll be heading to the book store tomorrow to pick up a book and read up on this, but any experience in this area, particularly including taking pictures that are saved on my local disk and storing them in a web-based MySQL db would be greatly appreciated. I've seen sample apps for SQL Server 2005 that do this, but not MySQL and get the impression it's not nearly as easy, but probably possible. Thanks!!
modified on Monday, December 24, 2007 10:29:00 PM
Mike L. wrote:
IMAGE data type that I can use to store pictures in the db. Can MySQL do the same?
Yes. I think it is the blob datatype.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Mike L. wrote:
IMAGE data type that I can use to store pictures in the db. Can MySQL do the same?
Yes. I think it is the blob datatype.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
I have a sample around here somewheres. I'll try to find it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
I have a sample around here somewheres. I'll try to find it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
Thanks Paul. I also have the ability to use Access, and have samples for storing & retrieving files from that. Any advantage to MySQL, since I don't have MySQL, but do have Access? i.e., it'll cost me some money to use MySQL, where I can use Access for free, and this is a personal web site for storing photo's, etc.
-
Thanks Paul. I also have the ability to use Access, and have samples for storing & retrieving files from that. Any advantage to MySQL, since I don't have MySQL, but do have Access? i.e., it'll cost me some money to use MySQL, where I can use Access for free, and this is a personal web site for storing photo's, etc.
Go ahead and use Access. Shouldn't be any problems. Since you are going to be storing photos, the best approach with a database is to save just the path on the server to the photos rather than putting the photos in the database.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Go ahead and use Access. Shouldn't be any problems. Since you are going to be storing photos, the best approach with a database is to save just the path on the server to the photos rather than putting the photos in the database.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
That would certainly make it easier, but won't having a database and an "add picture and keywords" type of functionality make it easier to store, retrieve, and catalog? I have literally thousands and thousands of travel photos from all over the world, and want to be able to give friends and family the ability to search by subject, then return those that match the criteria, which would then show thumbnails, and a click would bring up the full size image.... Thanks for all the help!
-
That would certainly make it easier, but won't having a database and an "add picture and keywords" type of functionality make it easier to store, retrieve, and catalog? I have literally thousands and thousands of travel photos from all over the world, and want to be able to give friends and family the ability to search by subject, then return those that match the criteria, which would then show thumbnails, and a click would bring up the full size image.... Thanks for all the help!
You could still just store the path to the pictures even with searching abilities.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
You could still just store the path to the pictures even with searching abilities.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
The logic and the simplicity of that just dawned on me - I still get "protected" storage from the site, and retain search and keyword capbilities. Plus I don't have the overhead of database load/unload and the associated database size issues. Thanks Paul - that seems to be the most sensible approach and also easiest.
-
The logic and the simplicity of that just dawned on me - I still get "protected" storage from the site, and retain search and keyword capbilities. Plus I don't have the overhead of database load/unload and the associated database size issues. Thanks Paul - that seems to be the most sensible approach and also easiest.
No problem. Glad it is working out for you :)
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon