1👍
✅
Reading/writing to files is essentially the slowest thing there is in modern computation. I don’t remember the numbers, but it is something like a 1000 times slower than memory access.
A database management system does store everything on the disk, but when you communicate with it, most of the time you are talking to the in-memory copy. The dump to the drive happens in the background.
So, from the performance perspective, as well as from the organisational point of view, using a database is preferable.
Source:stackexchange.com