kate_rose Posted June 12, 2008 Share Posted June 12, 2008 I was wondering what the advantages are of storing images in a mysql data base versus retrieving images stored on the server. Which is better? My application: I am developing a web browser based plant ID system that I want to run on & off-line. It will be heavily reliant on images. I am planning to create a CD with all my images for offline use & I will probably include wampserver so in can be run offline. I could alternatively store those images in mysql. I have heard that mysql retrieval of images takes longer. Does it take a lot longer?? If I have a lot of images would it significantly affect their load time? I also want my users to be able to upload & save their photos for comparison purposes. I want the database to be dynamic in that the user could add to or shape the visual elements of the ID system. I also want to be able to update it as I acquire new images & add plants. I have also heard that mysql is better for user upload because of complications with the paths. True?? I would love to hear your opinions & any info you have to share. Thanks, Kate Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 12, 2008 Share Posted June 12, 2008 About the only advantage I can think of for storing an image (or any other file) in a database is if you want that image/file to be accessible to more than one web site or more than one web server. If an image/file is stored as a file in a folder, by default it is only accessible to the account that owns that folder, whereas a database would be or could be made accessible to multiple web sites or web servers. Everything else about storing a file in a database is a disadvantage - There is additional overhead just putting the file into a database and every time it is retrieved. There is a database transfer packet size that will limit how big a file can be put into or retrieved in a single query. It causes the database data file size to grow quickly, which makes backing up or moving the database harder because you must store and move a file that is the size of all the images that is in it. It is much easier and less error prone (and easier to recover from an error) to upload/download (ftp) multiple smaller files than a huge database dump/backup file. Quote Link to comment Share on other sites More sharing options...
kate_rose Posted June 12, 2008 Author Share Posted June 12, 2008 So if I want multiple users to be able to use the id program on line at the same time I need to store them in the db?? Sounds like a bad idea all around but I would like to accomadate multiple users if possible. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 12, 2008 Share Posted June 12, 2008 So if I want multiple users to be able to use the id program on line at the same time I need to store them in the db??No. I stated more than one web site. That does not mean more than one visitor to a single web site. Quote Link to comment Share on other sites More sharing options...
kate_rose Posted June 12, 2008 Author Share Posted June 12, 2008 Thanks Guru I appreciate the info. Sorry I misunderstood. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.