What you recommend for storing images in:-
- File System or
- Database
This is conceptual question, I want to conclude, which approach is better in different projects.
Note: please justify which approach is better.
What you recommend for storing images in:-
This is conceptual question, I want to conclude, which approach is better in different projects.
Note: please justify which approach is better.
There is no need to store images in your database, because you will never lookup based on the data itself. Instead you should store them in the filesystem and store the file paths in the database. By putting the data on your hard drive you can access them directly for various other programs including backup. A smaller SQL is easier to maintain.
Which is better depends on your situation (of course). Keeping them in a database means that the system is pretty much completely portable. Everything is tightly linked and "travels" together.
The downside is that everything is tightly linked and you need to hit the database to retrieve the image. This includes running any code needed to connect to the database an process the image information. That's a lot of overhead.
No, not really anymore, or really ever. It use to be acceptable if you needed to access something like a users picture from any application, and there was no real way to store this on a global server. But right now with alternatives like Amazon's Cloud API's to store images, there really isn't a need to store them in a database anymore, you use use Amazon's Cloud as your database.