Which is better : Storing/retrieving images on/from SQL server or in a directory on server
- by Pankaj Upadhyay
I am working on a project in Asp.net MVC and need to work with images. There is an SQL database with a Product table. Every product in the table will have it's own image. I have two ways to do this :
1) Save the image in a web directory and store the URL on database.
2) Store the image in SQL itself in binary format and then retrieve it.
Which is a better approach ? Mind you, I have no idea how second method works :-P . I will only learn this if there are merits to the second method