icon
Personal Website

Weekly Coding • 2025-02-28

Hello everyone. This week I spent 10 hours coding in my free time and completed my program to compare SQLite and MongoDB.

SQLite vs MongoDB ⚔️ https://github.com/hinst/mongodb-sqlite-versus

  • SQLite is roughly seven times faster than MongoDB:
    • SQLite operates directly on a file without HTTP, whereas MongoDB requires client-server communication.
  • MongoDB files take up approximately half the disk space compared to SQLite:
    • MongoDB supports built-in zstd compression.

Compression can be disabled in MongoDB, but it hardly affects performance.

I believe SQLite is better suited for micro-projects on Orange Pi. I have a 256GB memory card, which should be enough even for larger databases. However, Debian, Docker, and Kubernetes already consume 40GB. Additionally, MongoDB has compatibility issues on Orange Pi: the official version fails to launch due to these problems. I managed to run MongoDB on Orange Pi using some juggling, but SQLite boots right out of the box.

I also tried testing libSQL from Turso, but bugs and unfinished features quickly killed my enthusiasm. I think I'll start working on a mini website project for Orange Pi soon, but first, I need to catch up on sleep 😴.