joplin-notes/joplin notion extension/Web Development/NOSQL/embedded database.md
2026-11-04 00:33:23 +05:30

95 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

embedded database
**from llm**
Yes — there are several **SQLite-like databases** that:
* ✅ Store everything in a **single file**
* ✅ Don’t require a central server
* ✅ Can store **BSON / document-style data** (instead of strict tables)
Here are the best options depending on what you want:
---
## 1️⃣ **LiteDB** (Very close to what you described)
* Embedded
* Single `.db` file
* No server required
* Stores data as **BSON documents**
* Very similar to MongoDB API
* Great for .NET apps
If you're using C#, this is probably the cleanest choice.
---
## 2️⃣ **MongoDB + Embedded Alternatives**
MongoDB itself requires a server, BUT there are embedded variants:
### 🔹 **Realm**
* Embedded
* Local file storage
* Document-style
* Good for mobile apps
### 🔹 **NeDB**
* Pure JS
* Stores data in a file
* Mongo-like API
* Good for Node.js apps
---
## 3️⃣ **UnQLite**
Very interesting option:
* Embedded (like SQLite)
* Single file
* No server
* Key-value + document store
* JSON-like storage
* Written in C
This is probably the closest SQLite-style NoSQL engine.
---
## 4️⃣ SQLite itself (with JSON)
Even regular **SQLite** supports:
* JSON columns
* JSON queries
* Single-file database
* Zero configuration
If you just need document-style storage without strict schema, SQLite + JSON might already be enough.
---
# 🔎 Quick Comparison
| DB | File-based | Serverless | BSON/Document | Best For |
| ------- | ---------- | ---------- | --------------- | ------------ |
| LiteDB | ✅ | ✅ | ✅ BSON | .NET apps |
| UnQLite | ✅ | ✅ | ✅ JSON-like | C / embedded |
| NeDB | ✅ | ✅ | ✅ JSON | Node.js |
| SQLite | ✅ | ✅ | JSON (not BSON) | General use |
---
If you tell me:
* What language you’re using
* Desktop / web / mobile?
* Approx data size?
I can give you a more precise recommendation.