Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. WCDB

WCDB

NOASSERTIONCv2.1.16

A cross-platform mobile database framework based on SQLite, offering ORM, encryption, and corruption recovery.

GitHubGitHub
11.6k stars1.5k forks0 contributors

What is WCDB?

WCDB is a cross-platform mobile database framework developed by WeChat, built on SQLite and SQLCipher. It provides an efficient, feature-rich solution for data persistence in mobile applications, supporting multiple programming languages and operating systems. The framework solves common mobile database challenges like encryption, corruption recovery, and performance optimization.

Target Audience

Mobile developers building applications for iOS, Android, macOS, Windows, Linux, or OpenHarmony who need a reliable, high-performance database layer with cross-language support. It's particularly suited for teams using multiple languages (C++, Java, Kotlin, Swift, Objective-C) within a single project.

Value Proposition

Developers choose WCDB for its battle-tested reliability from WeChat's scale, comprehensive feature set including encryption and corruption recovery, and seamless cross-language compatibility. Its ORM and WINQ query system significantly reduce boilerplate code while maintaining type safety and performance.

Overview

WCDB is a cross-platform database framework developed by WeChat.

Use Cases

Best For

  • Building high-performance mobile apps requiring secure data encryption
  • Developing cross-platform applications with shared database logic in multiple languages
  • Implementing robust data persistence with automatic corruption recovery
  • Reducing SQL boilerplate code with type-safe ORM and query builders
  • Optimizing database storage with transparent field-level compression
  • Adding full-text search capabilities to mobile applications

Not Ideal For

  • Projects exclusively using JavaScript or Dart for cross-platform development (e.g., React Native, Flutter) without native code integration
  • Applications requiring minimal database functionality where a lightweight, direct SQLite wrapper would suffice
  • Teams deeply entrenched in platform-specific ORMs like Room for Android or Core Data for iOS, seeking to avoid migration overhead

Pros & Cons

Pros

Cross-Language Consistency

Supports C++, Java, Kotlin, Swift, and Objective-C with shared underlying logic, enabling seamless database operations across different parts of a project without conflicts, as shown in the uniform code examples for CRUD operations.

Comprehensive Feature Set

Includes encryption via SQLCipher, built-in corruption recovery, full-text search with multilingual tokenizers, and transparent data compression using Zstd, addressing common mobile database challenges out of the box.

Performance Optimizations

Deeply optimized SQLite and SQLCipher for mobile scenarios, with support for concurrent read-read and read-write access via connection pooling, and optimizations for batch operations to enhance efficiency.

Type-Safe Querying

WINQ provides language-integrated queries that eliminate SQL string concatenation, reducing injection risks and improving code safety, as demonstrated in the type-safe syntax across all supported languages.

Cons

Complex Initial Setup

Requires separate building and installing steps for each language (C++, Java/Kotlin, Swift, Objc), as indicated by the multiple wiki links, which can be time-consuming and error-prone compared to simpler drop-in libraries.

Limited Community and Ecosystem

Being developed primarily by Tencent for WeChat, it has a smaller community and fewer third-party integrations compared to established alternatives like Room or SQLite.swift, potentially slowing down issue resolution and adoption.

Potential Over-Engineering

The extensive feature set, including corruption recovery and data compression, might introduce unnecessary complexity and overhead for applications with basic or lightweight database needs, where a simpler solution could be more maintainable.

Frequently Asked Questions

Quick Stats

Stars11,643
Forks1,502
Contributors0
Open Issues28
Last commit14 days ago
CreatedSince 2017

Tags

#mobile-database#orm#database#ios#data-persistence#database-encryption#android#wechat#full-text-search#sqlcipher#linux#sqlite#cross-platform#macos#windows

Built With

S
SQLite
Z
ZSTD
K
Kotlin
O
Objective-C
S
SQLCipher
J
Java
S
Swift
C
C++

Included in

iOS51.7k
Auto-fetched 1 day ago

Related Projects

MMKVMMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, POSIX, and OHOS.

Stars18,766
Forks1,995
Last commit1 day ago
RealmRealm

Realm is a mobile database: a replacement for Core Data & SQLite

Stars16,601
Forks2,233
Last commit26 days ago
FMDBFMDB

A Cocoa / Objective-C wrapper around SQLite

Stars13,820
Forks2,729
Last commit7 months ago
SQLite.swiftSQLite.swift

A type-safe, Swift-language layer over SQLite3.

Stars10,186
Forks1,613
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub