DEV Community

loading...

Discussion on: Filesystem versus SQLite performance

Collapse
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

Yup, file-based database systems are sort of a regression. They actually predate SQL and had many problems, not the least of which was speed. There are also the issues of:

  • Data redundancy and corruption (e.g., simultaneous read/write ops without proper locking mechanisms). This is enforced by RDBMSes and SQL engines.
  • Usability. With SQL, all you need is a library for your language of choice (e.g., Python) that interfaces with a particular vendor (e.g., Postgres). Plus you have a standard language for CRUD operations, and it has a sound mathematical basis in relational algebra.
  • Modern RDBMSes are much faster than file systems. They enforce keys for faster data lookups and use more efficient tree-based structures under the hood. Files are flat/plaintext.
  • Portability. File systems vary from one OS to another. SQL doesn't.