Anonymous Asked in Cars &Transportation · 2 weeks ago

Why is it bad to store images in a database?

Its not recommended to store images in DB, You can upload images to server and save their path in DB. Rendering image from static path is faster than Database. Even then you want to save it DB, you can have Blob type field in DB which can store binary data. 4 мая 2015 г.


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

Relevance
Write us your question, the answer will be received in 24 hours