• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Image Databases

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know of a platform/DB environment which supports storage and retreival of a large number of images.
Eventually I want to be able to access and retrieve images based once I store each image with its custom header tag.
Any pointers/hints ? Thanks in advance...
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know of any image-specific solutions but every database I've worked with (MSSQL, Oracle, MySQL) supported binary large objects (BLOB). I just used a field of that type to store the image.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joe Ess:
I don't know of any image-specific solutions but every database I've worked with (MSSQL, Oracle, MySQL) supported binary large objects (BLOB). I just used a field of that type to store the image.


Joe is correct. With that being said, however, storing large amounts of binary data in a database will kill your performance. You would be better off storing the image on the hard drive somewhere and just storing the location of that image in the database.
 
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

yea, storing things in databases is useless. I think you should put all your data in flat files & just use the database for filenames!

Mr Bose, don't listen to Gregg, he's just winding you up. Like Joe says every commercial database supports binary (i.e. picture) fields. And will give you better performance than using a (non caching) filesystem.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Simon Lee:

yea, storing things in databases is useless. I think you should put all your data in flat files & just use the database for filenames!

Mr Bose, don't listen to Gregg, he's just winding you up. Like Joe says every commercial database supports binary (i.e. picture) fields. And will give you better performance than using a (non caching) filesystem.


Why can't Mr. Bose listen to me? I stated my opinion, based on personal research BTW, that gives Mr. Bose another option to solve his problem.
Although the "Be Nice" rule is typically reserved for the Meaningless Drivel forum, it does apply throughout this Board. So please, be nice!
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Article with hard data regarding BLOB vs. filesystem performance in Mysql (BLOB 30% slower.)
Another discussion, same conclusion.
Another point neither of these articles make but that's very important in big installations: if you use BLOBs, then your image data will be replicated on all slave servers; if you just store filenames, then a single server can serve all the images with far better caching.
Gregg knows what he's talking about, Mr. Lee. BLOBs aren't evil or anything, but their (small) convenience factor is very often outweighed by performance issues. Since you can't index on the actual image data, there's really no compelling reason to store images as BLOBs at all.
[ December 17, 2003: Message edited by: Ernest Friedman-Hill ]
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey I was being nice
wait till I get drunk
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(hic!)
not sure if this link will work Ask Tom - Storing Images in database as BLOB Vs storing images on file system on Application Server
To be honest I was a bit shocked by the stats that the filesystem is faster. However remember that the webserver can memory cache pages served up by the appserver just as well as pages (images) from the filesystem.
I also think that 1st URL is comparing apples with oranges. In the php script he already knows the filename (rather than making a trip to the database to get the filename).
I think the point Tom makes about large number of images. is very valid. Certainly I know that if you set up usenet server you need to format the hard disk to deal with the thousands of small files. With a database you don't need to worry about this ( spreading the tablespace over many disks etc..).
Anyway I kind of get the impression that the comments were more about my attitude than my suggestion, so I'll try & behave myself in future. :roll:
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anyway I kind of get the impression that the comments were more about my attitude


Exactly. Rather than "Don't listen to Gregg...", perhaps something along the lines of "I'm not sure that I agree with Gregg about..."
bear
 
Fire me boy! Cool, soothing, shameless self promotion:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic