README.md

May 26, 2025 · View on GitHub

Ultra High-performance Lightweight Embedded and Server OLTP RDBMS✨

Features

NameCrossDB
DescriptionUltra High-performance Lightweight Embedded and Server OLTP RDBMS✨
Primary database modelRelational DBMS
Secondary database modelsDocument store(JSON)
Key-value store(TBD)
Websitecrossdb.org
Technical documentationcrossdb.org/intro
Initial release2023
LicenseOpen Source, MPL
Cloud-based onlyno
Implementation languageC
Server operating systemsServer-Less Mode
Embedded Server Mode
Standalone Server Mode
Linux/MacOS/Windows/FreeBSD
32-bit or 64-bit X86, ARM, PowerPC, MIPS, etc
Data schemeyes
Typingyes
BOOL
TINYINT, SMALLINT, INT, BIGINT
UNSIGNED TINYINT, SMALLINT, INT, BIGINT
TIMESTAMP
FLOAT, DOUBLE
CHAR, VARCHAR
BINARY, VARBINARY
INET(IPv4/IPv6 host and subnet), MAC address
JSON
XML supportno
Secondary indexesyes
HASH, RBTREE(TBD)
SQLyes, many extensions from MySQL
APIs and other access methodsProprietary native APIs
Multi-statement APIs
Prepared statement APIs
Supported programming languagesC, C++, Python, GO, Rust
More bindings(TBD)
Server-side scriptsLUA(TBD)
Triggersyes, native languages
Partitioning methodsnone
Replication methodsSource-replica replication
Multi-source replication
Logical Replication(TBD)
Data Subscriptionyes(TBD)
MapReduceno
Consistency conceptsImmediate Consistency
Foreign keysyes(TBD)
TTLyes
Transaction conceptsACID
Concurrencyyes
Table-level read-write locks
Row-level read-write locks(TBD)
Reader-Writer MVCC (write transaction doesn't block read transactions)
PostgreSQL-like MVCC(TBD)
Durabilityyes, WAL
In-memory capabilitiesyes
User conceptsyes(TBD)
Storage ModelRow-oriented On-Disk, In-Memory, RamDisk
Hybrid Storage (on a table-by-table basis, tables can be designated for in-memory or on-disk storage)
AdminEmbedded shell
xdb-cli tool
telnet
WEB GUI(TBD)

Build and Install

Download code

git clone https://github.com/crossdb-org/crossdb.git
cd crossdb

Linux/MacOS/FreeBSD

make build
sudo make install

Windows

You need to install MINGW64 to build. Then set the gcc path to system environment variables Path and make sure gcc can run.

winbuild.bat

CMake

cd build
cmake ..
make
sudo make install

Windows

You need to install MINGW64 CMAKE and make to build.

cd build
cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=gcc ..
make

Contribution

This project is still in its early stages and currently lacks stability. We welcome the following contributions:

  • Language bindings: Python, Java, Go, CSharp, JavaScript, PHP, etc.
  • Bug Reporting: Identify and report any issues or bugs you encounter.
  • Testing: Participate in testing to ensure the reliability and stability of the project.

Your contributions will be greatly appreciated and will help us make this project more robust and reliable.

Reference

1,000,000 Rows Random Access Benchmark vs. SQLite

https://crossdb.org/blog/benchmark/crossdb-vs-sqlite3/

1,000,000 Rows Random Access Benchmark vs. C++ STL Map and HashMap

https://crossdb.org/blog/benchmark/crossdb-vs-stlmap/

SQL Statements

https://crossdb.org/sql/statements/

APIs

https://crossdb.org/client/api-c/

Tutorial

https://crossdb.org/get-started/tutorial/

CrossDB Server

https://crossdb.org/develop/server/

CrossDB Replication

https://crossdb.org/develop/replication/

CrossDB JSON

https://crossdb.org/sql/json/