We are building a web application that will display metadata along with a jpg image. For performance reasons I have been advised to reference the jpg images by means of a path stored in a database column, rather than to store the image directly, as, say a BLOB, in the database. The jpg images would reside in a file directory outside the database.
Let's say each row of data will be associated with one jpg image. What is the best way of naming/referencing the associated jpg? by the unique id of the database row? It would be nice to give the jpg a name meaningful to the user, but the database id would be better, I would assume.