vs

MMKV vs SQLite

MMKV: Tencent's mmap-backed key-value store for mobile apps, built as a faster SharedPreferences/NSUserDefaults. SQLite: The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.

key differences

  • MMKV is primarily a key-value database; SQLite is relational.
  • Transactions: MMKV offers none ACID; SQLite offers full.
  • Only MMKV has ttl / expiry, encryption at rest.
  • Only SQLite has transactions, joins, secondary indexes, full-text search, json.

choose mmkv for

  • +Replacing SharedPreferences, NSUserDefaults or AsyncStorage
  • +Feature flags and user settings
  • +Small session and token caches on device

best at · Embedded, Coordination, Cache

choose sqlite for

  • +Mobile and desktop application storage
  • +Embedded devices and IoT
  • +Local-first apps and offline caches
  • +Test fixtures and data interchange files

best at · Embedded, Mobile/offline, Edge

overview
Primary model
Key-Value
Relational
Also supports
–
Document
Type
Embedded library
Embedded library
Status
Active
Active
Developer
Tencent
D. Richard Hipp / Hwaci (SQLite Consortium)
First release
2018
2000
Latest version
2.4.3 (Oct 16, 2026)
3.54.1 (Oct 16, 2026)
License
Open source (permissive)BSD 3-Clause License
Open source (permissive)Public Domain
Free tier
✓
✓
popularity
WhichDB Score
6.3
75.5
Rank
#364
#5
GitHub stars
18.8K
10.8K
Stack Overflow questions
–
94.9K
scale & guarantees
Comfortable data size
Small (≤ 100 GB)
Small (≤ 100 GB)
Horizontal scaling
None
None
Multi-region
None
None
ACID
None
Full
Consistency
Strong
Strong
Schema
Schemaless
Flexible
Architecture
Embedded
Embedded, Single node
deployment
Self-hosted
✓
✓
Vendor-managed cloud
—
—
Serverless
—
—
Embedded
✓
✓
Edge
—
✓
Clouds
–
–
capabilities
Transactions
—
✓
Joins
—
✓
Secondary indexes
—
✓
Full-text search
—
✓
Vector search
—
—
Geospatial
—
—
JSON
—
✓
Change data capture
—
—
Triggers
—
✓
Stored procedures
—
—
Materialized views
—
—
TTL / expiry
✓
—
Pub/Sub
—
—
Columnar storage
—
—
In-memory
—
✓
Durable persistence
✓
✓
Compression
—
—
Encryption at rest
✓
—
Role-based access
—
—
Time travel
—
—
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
✓
interfaces
Query languages
Key-value API
SQL
Client languages
C++, Java, Kotlin, Objective-C, Swift, Dart, Python, Go
C, Python, Java, JavaScript, Go, Rust, C#, Swift
Best for
Embedded, Coordination, Cache, Sessions
Embedded, Mobile/offline, Edge, Local-first

MMKV vs SQLite: FAQ

What is the difference between MMKV and SQLite?

MMKV: Tencent's mmap-backed key-value store for mobile apps, built as a faster SharedPreferences/NSUserDefaults. SQLite: The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers. MMKV is primarily a key-value database; SQLite is relational. Transactions: MMKV offers none ACID; SQLite offers full. Only MMKV has ttl / expiry, encryption at rest.

When should I choose MMKV over SQLite?

Choose MMKV for replacing SharedPreferences, NSUserDefaults or AsyncStorage; feature flags and user settings; and small session and token caches on device. Choose SQLite for mobile and desktop application storage; embedded devices and IoT; and local-first apps and offline caches.

Is MMKV or SQLite more popular?

SQLite ranks #5 on the WhichDB Score (75.5/100) and MMKV ranks #364 (6.3/100). Popularity is not fit: check the requirements that matter for your project.

Are MMKV and SQLite open source?

Yes. MMKV is open source. License: BSD 3-Clause License. Yes. SQLite is open source. License: Public Domain.