# Database architecture examples

Interactive architecture diagrams of 41 open-source repositories with a GitDiagram architecture diagram where the diagram names at least two inner parts of a database, such as a storage engine, query planner, write-ahead log, B-tree, LSM tree or buffer pool, most stars first. Each diagram shows the project's main components, how they connect, and links every part to its file on GitHub.

Across the 41 most-starred databases and storage engines here, the median diagram has 21 components. 85% draw a data store (most often object storage (S3 and similar), a cache and files on disk), 17% have a command-line interface and 7% a web interface.

17% have a plugin or extension system.

The files their components link to most are mod.rs (5), db.h (4), lib.rs (4), memtable.cc (4) and db_iter.cc (3).

Group names that recur: “query processing” (6), “client access” (5), “query execution” (5), “cluster services” (4) and “sql processing” (4).

By language: C++ 32%, Rust 17%, Go 15%, C 10% and Java 10%.

## Repositories 1 to 41 of 41

1. [run-llama/llama_index](https://gitdiagram.com/run-llama/llama_index) (52.3k stars, Python): LlamaIndex OSS is a Python framework for grounding LLM applications in user data, with retrieval-augmented querying and agent orchestration as central capabilities. Markdown: https://gitdiagram.com/run-llama/llama_index.md
2. [clickhouse/clickhouse](https://gitdiagram.com/clickhouse/clickhouse) (50.1k stars, C++): ClickHouse is a column-oriented database for real-time analytical queries. Markdown: https://gitdiagram.com/clickhouse/clickhouse.md
3. [milvus-io/milvus](https://gitdiagram.com/milvus-io/milvus) (46.3k stars, Go): Milvus is a distributed vector database for storing and searching vector and scalar data. Markdown: https://gitdiagram.com/milvus-io/milvus.md
4. [pingcap/tidb](https://gitdiagram.com/pingcap/tidb) (40.6k stars, Go): TiDB is a distributed SQL database: applications submit SQL to a server, which compiles and executes queries using distributed storage and cluster services. Markdown: https://gitdiagram.com/pingcap/tidb.md
5. [posthog/posthog](https://gitdiagram.com/posthog/posthog) (40.3k stars, Python): PostHog is a product-data platform: it collects analytics, replay, logs, and other business context, then lets people and agents explore and act on that context. Markdown: https://gitdiagram.com/posthog/posthog.md
6. [google/leveldb](https://gitdiagram.com/google/leveldb) (39.5k stars, C++): LevelDB is an embedded, ordered key-value storage library. Markdown: https://gitdiagram.com/google/leveldb.md
7. [surrealdb/surrealdb](https://gitdiagram.com/surrealdb/surrealdb) (33.1k stars, Rust): SurrealDB is a Rust multi-model database and API backend. Markdown: https://gitdiagram.com/surrealdb/surrealdb.md
8. [meta/rocksdb](https://gitdiagram.com/meta/rocksdb) (32.2k stars, C++): RocksDB is a persistent key-value database library built around an LSM design. Markdown: https://gitdiagram.com/meta/rocksdb.md
9. [facebook/rocksdb](https://gitdiagram.com/facebook/rocksdb) (32.2k stars, C++): RocksDB is an embeddable persistent key-value store built around an LSM design. Markdown: https://gitdiagram.com/facebook/rocksdb.md
10. [influxdata/influxdb](https://gitdiagram.com/influxdata/influxdb) (31.4k stars, Rust): InfluxDB 3 Core is a time-series database for ingesting, transforming, storing, and querying event data. Markdown: https://gitdiagram.com/influxdata/influxdb.md
11. [grafana/loki](https://gitdiagram.com/grafana/loki) (29k stars, Go): Loki is a multi-tenant log aggregation system: collection agents push logs to Loki, which stores compressed log data while indexing stream labels, and users query results through… Markdown: https://gitdiagram.com/grafana/loki.md
12. [mongodb/mongo](https://gitdiagram.com/mongodb/mongo) (28.7k stars, C++): MongoDB is a database server (mongod) with a sharding router (mongos). Markdown: https://gitdiagram.com/mongodb/mongo.md
13. [rethinkdb/rethinkdb](https://gitdiagram.com/rethinkdb/rethinkdb) (27k stars, C++): RethinkDB is a distributed, schemaless JSON database designed for realtime applications. Markdown: https://gitdiagram.com/rethinkdb/rethinkdb.md
14. [taosdata/tdengine](https://gitdiagram.com/taosdata/tdengine) (25.1k stars, C): TDengine is a distributed, cloud-native time-series database for high-volume IoT ingestion, storage, querying, stream processing, subscriptions, and analytics. Markdown: https://gitdiagram.com/taosdata/tdengine.md
15. [neondatabase/neon](https://gitdiagram.com/neondatabase/neon) (23.3k stars, Rust): Neon is a serverless PostgreSQL platform: clients connect to stateless PostgreSQL compute, while pageservers provide durable, branchable storage and safekeepers retain redundant… Markdown: https://gitdiagram.com/neondatabase/neon.md
16. [postgres/postgres](https://gitdiagram.com/postgres/postgres) (22.7k stars, C): PostgreSQL is an object-relational database server. Markdown: https://gitdiagram.com/postgres/postgres.md
17. [openobserve/openobserve](https://gitdiagram.com/openobserve/openobserve) (22k stars, TypeScript): OpenObserve is a unified observability platform for ingesting logs, metrics, traces, RUM, and AI telemetry, then storing, compacting, querying, visualizing, and alerting on those… Markdown: https://gitdiagram.com/openobserve/openobserve.md
18. [cube-js/cube](https://gitdiagram.com/cube-js/cube) (20.9k stars, Rust): Cube Core is an open-source semantic layer. Markdown: https://gitdiagram.com/cube-js/cube.md
19. [neo4j/neo4j](https://gitdiagram.com/neo4j/neo4j) (17.3k stars, Java): Neo4j is a graph database, exposed here through Bolt and the HTTP Query API, with query routing and transaction handling at the center of the request path. Markdown: https://gitdiagram.com/neo4j/neo4j.md
20. [apache/doris](https://gitdiagram.com/apache/doris) (16k stars, Java): Apache Doris is an MPP analytics and search database. Markdown: https://gitdiagram.com/apache/doris.md
21. [dgraph-io/badger](https://gitdiagram.com/dgraph-io/badger) (15.8k stars, Go): BadgerDB is an embeddable Go key-value database. Markdown: https://gitdiagram.com/dgraph-io/badger.md
22. [scylladb/scylladb](https://gitdiagram.com/scylladb/scylladb) (15.6k stars, C++): - The core deliverable is the scylla database server: a distributed, shared-nothing, sharded storage engine implemented in C++ and built on Seastar. Markdown: https://gitdiagram.com/scylladb/scylladb.md
23. [vesoft-inc/nebula](https://gitdiagram.com/vesoft-inc/nebula) (12.4k stars, C++): NebulaGraph is a distributed graph database. Markdown: https://gitdiagram.com/vesoft-inc/nebula.md
24. [alibaba/zvec](https://gitdiagram.com/alibaba/zvec) (11.5k stars, C++): 1. Repository purpose and top-level shape Markdown: https://gitdiagram.com/alibaba/zvec.md
25. [harelba/q](https://gitdiagram.com/harelba/q) (10.4k stars, Python): q is a command-line SQL interface for querying delimited text files and SQLite databases. Markdown: https://gitdiagram.com/harelba/q.md
26. [oceanbase/oceanbase](https://gitdiagram.com/oceanbase/oceanbase) (10.3k stars, C++): OceanBase is a distributed relational database, with documented MySQL compatibility, scalable storage, HTAP, and continuous availability. Markdown: https://gitdiagram.com/oceanbase/oceanbase.md
27. [sqlite/sqlite](https://gitdiagram.com/sqlite/sqlite) (10.1k stars, C): SQLite is an embedded C database engine, distributed primarily as a library and optionally as a command-line shell. Markdown: https://gitdiagram.com/sqlite/sqlite.md
28. [workiva/go-datastructures](https://gitdiagram.com/workiva/go-datastructures) (8k stars, Go): This is a Go library of reusable data structures, concurrency primitives, spatial indexes, and numerical algorithms; it is not an application or service. Markdown: https://gitdiagram.com/workiva/go-datastructures.md
29. [hibernate/hibernate-orm](https://gitdiagram.com/hibernate/hibernate-orm) (6.5k stars, Java): Hibernate ORM maps Java object models to relational data, supporting query execution, transactionally synchronized persistence, and database-specific SQL behavior. Markdown: https://gitdiagram.com/hibernate/hibernate-orm.md
30. [apache/pinot](https://gitdiagram.com/apache/pinot) (6.1k stars, Java): Apache Pinot is a distributed real-time OLAP datastore for low-latency SQL analytics over streaming and batch data. Markdown: https://gitdiagram.com/apache/pinot.md
31. [xerj-org/xerj](https://gitdiagram.com/xerj-org/xerj) (6k stars, Rust): XERJ is a local AI search and indexing engine. Markdown: https://gitdiagram.com/xerj-org/xerj.md
32. [cockroachdb/pebble](https://gitdiagram.com/cockroachdb/pebble) (5.8k stars, Go): - Pebble is an embeddable Go key-value store modeled after LevelDB/RocksDB. Markdown: https://gitdiagram.com/cockroachdb/pebble.md
33. [cmu-db/bustub](https://gitdiagram.com/cmu-db/bustub) (5.1k stars, C++): BusTub is an educational relational database with basic SQL and an interactive shell. Markdown: https://gitdiagram.com/cmu-db/bustub.md
34. [oceanbase/miniob](https://gitdiagram.com/oceanbase/miniob) (4.4k stars, C++): MiniOB is a learning-oriented relational database server, with a separate client and an embeddable LSM-tree implementation. Markdown: https://gitdiagram.com/oceanbase/miniob.md
35. [ravendb/ravendb](https://gitdiagram.com/ravendb/ravendb) (4k stars, C#): RavenDB is an ACID NoSQL database with a .NET client, server-side query and document operations, a Corax search engine, and Voron storage. Markdown: https://gitdiagram.com/ravendb/ravendb.md
36. [hydra-db/hydradb](https://gitdiagram.com/hydra-db/hydradb) (3.9k stars, Rust): HydraDB is a distributed, object-store-native graph database. Markdown: https://gitdiagram.com/hydra-db/hydradb.md
37. [slatedb/slatedb](https://gitdiagram.com/slatedb/slatedb) (3.5k stars, Rust): SlateDB is an embedded LSM-tree key-value store that persists sorted tables and related state in object storage. Markdown: https://gitdiagram.com/slatedb/slatedb.md
38. [linq2db/linq2db](https://gitdiagram.com/linq2db/linq2db) (3.3k stars, C#): LINQ to DB is a type-safe LINQ-to-SQL data access library. Markdown: https://gitdiagram.com/linq2db/linq2db.md
39. [oceanbase/seekdb](https://gitdiagram.com/oceanbase/seekdb) (3.1k stars, C++): seekdb is a MySQL-compatible database for embedded and server use, with transactional SQL, hybrid vector/full-text/scalar search, and agent-oriented sandboxing. Markdown: https://gitdiagram.com/oceanbase/seekdb.md
40. [apache/kyuubi](https://gitdiagram.com/apache/kyuubi) (2.4k stars, Scala): Apache Kyuubi is a multi-tenant SQL gateway for serverless Spark and other SQL engines. Markdown: https://gitdiagram.com/apache/kyuubi.md
41. [bloomberg/comdb2](https://gitdiagram.com/bloomberg/comdb2) (1.5k stars, C): Comdb2 is a clustered relational database: clients submit SQL, the server executes it through its SQL and table layers, and transactional data is stored by the Berkeley DB-based… Markdown: https://gitdiagram.com/bloomberg/comdb2.md

More hubs: https://gitdiagram.com/architecture-examples

Counted over GitDiagram's stored diagrams of public repositories, from the names their components and groups carry and the files they link to; the rules are the ones in the [2026 open-source architecture report](https://gitdiagram.com/open-source-architecture-2026). Stars are GitHub's when the diagram was last made. Rebuilt daily: hubs grow as more repositories' languages are known.
