Databases · Junior · Question 64 of 75
Why should you avoid storing large files (images, videos) directly in database rows?
- 1It makes the files public
- 2Databases can't store binary data at all
- ✓Correct answer: They bloat the database, backups and replication; object storage (like S3) with a URL in the database is usually better
Explanation
Store the file in object storage and keep metadata (key, size, owner) in the database. Small binary data is fine in a bytea column.