V
V
Vladimir Borisyuk2018-10-21 14:17:52
Database
Vladimir Borisyuk, 2018-10-21 14:17:52

How bad is it to store images in the database as blob?

Good afternoon! Tell me, how bad is it to store images that should be used in the news text as a blob object? Approximately 500 news stories with 5-10 pictures per year. How much will it load the system when fetching data?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Shumov, 2018-10-21
@Flight404

This is a very bad way) will work, but there are a number of drawbacks. Images must be stored separately, preferably not at all in the same place as the base

S
Sergey Krivosheev, 2018-10-21
@Nemozar

Bad decision, the database is not for that. Backups will swell. Get a table that will store a link to the file used in the article. And when deleting an article, immediately clean the Files that were uploaded for it. Well, plus the pictures will be static, nginx will do a great job and the application server will only do its own thing.
Of course, 500 articles is not a load on the database. Therefore, even if you store it in the database, you won’t feel much difference.

L
lega, 2018-10-21
@lega

In large systems, this is the only way they store (or in analogues), for example, Yandex disk (billions of files) was built on mongodb. The downside is that more resources are needed to implement.
Therefore, for small sites it is more convenient to save to files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question