Hello I would like to know which approach is better and in performance wise which is good. I want to store images and pull to show in webpages. 1. Is it good to keep the actual image on disk and keep link in database. 2. or store the image itself in database. eg: using MySQL BLOB. Which would be faster to retrieve on webPage. What is the common practice in the industry.
Environment: Linux,java or php MySQL , Apache or Tomcat
However if your database is on a server being accessed from more than one computer, the alternative to a blob is to store the images on a file on the database server. (Storing copies of the images on every computer that's accessing the database is obviously impractical.) Then you have the problem of how do those computers access the file system on that server, which may or may not be easy to solve.
subject: Storing image: Is it good to keep in DB or disk