Why is it bad to store images in a database?
- Why is storing images in database bad?
- Can images be saved in database?
- Should images be stored in database or server?
- Is it bad practice to store images in MySQL?
Why is storing images in database bad?
The problem with storing only filepaths to images in a database is that the database's integrity can no longer be forced. If the actual image pointed to by the filepath becomes unavailable, the database unwittingly has an integrity error.
Can images be saved in database?
To insert images into a database, the database must support images. Images are stored in binary in a table cell. The data type for the cell is a binary large object (BLOB), which is a new SQL type in SQL3 for storing binary data.
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.
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