Answer the question
In order to leave comments, you need to log in
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
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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question