Is it bad to store images in database?
- Why is it bad to store images in a database?
- Should images be stored in database or server?
- Is it bad practice to store images in MySQL?
- Is it good practice to store images in MySQL?
Why is it bad to store images in a database?
The problem with storing only filepaths to images in a database is that the database's integrity can no longer be forced.
Should images be stored in database or server?
Generally databases are best for data and the file system is best for files. It depends what you're planning to do with the image though. If you're storing images for a web page then it's best to store them as a file on the server. The web server will very quickly find an image file and send it to a visitor.
Is it bad practice to store images in MySQL?
There is no good or bad practice to store images (files) into a BLOB field. It is rather requirement dependent.
Is it good practice to store images in MySQL?
Yes, you can store images in the database, but it's not advisable in my opinion, and it's not general practice. A general practice is to store images in directories on the file system and store references to the images in the database.
Related Questions
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago