I am currently developing a webpage for a real estate (using Java server faces) ,so it is essential to store images connected to its house. I am using mysql workbench and I really have a hard time deciding how to implement this feature. To begin with, I don't know what field of mysql workbench I can use in order to store images. Searching with google I found out about a blob field but I don't know how can I convert it to this blob type. Also I don't know if it is a good idea to store images on a database at all. Another approach I came up with is to have a VARCHAR field with a path to a folder of images. Which is better? thx in advance

  • using Varchar would be better instead of using Blob. Because Varchar will have the path of image. Using Blob and storing the images will not be good. so you can use Varchar its more enough.. – Karthick Jul 28 '14 at 9:19
  • Ok I'll keep it in mind. Also on building may have many images so how can I implement that? – JmRag Jul 28 '14 at 9:21
  • Please go through the link stackoverflow.com/questions/7755629/… – Karthick Jul 28 '14 at 9:26
  • 1
    See the answers in the link that Matt provided. There are pros and cons for both ways (storing blobs vs. storing path to external files.) – ypercubeᵀᴹ Jul 28 '14 at 10:26

Browse other questions tagged or ask your own question.