High-Performance Encrypted Database for .NET 10
Embedded engine + production gRPC server in one ecosystem
SharpCoreDB is for .NET teams that want SQLite-like simplicity, enterprise-grade security, and server-scale capabilities without leaving the .NET ecosystem.
Use it when you need:
- Fast embedded storage with AES-256-GCM encryption and ACID guarantees
- A secure network database via gRPC (HTTP/2 + HTTP/3)
- Built-in vector search, advanced analytics, and GraphRAG/graph algorithms
- A production-focused stack validated by 2,000+ tests and backward compatibility
Full documentation:
docs/INDEX.md
- One stack, two deployment models: embedded and server mode
- Performance-first design: SIMD acceleration, memory pooling, optimized query paths
- Security by default: TLS 1.2+, JWT, optional mTLS, RBAC, encrypted single-file storage
- Modern .NET 10-native: C# 14, optional ecosystem packages, production-ready modules
| Capability | SharpCoreDB | LiteDB | SQLite | RavenDB / MongoDB |
|---|---|---|---|---|
| .NET-native embedded experience | ✅ First-class | ✅ | ❌ network-first | |
| Built-in encrypted single-file DB (AES-256-GCM) | ✅ | ❌ (extensions/custom setup) | ❌ | |
| Built-in gRPC server mode in same ecosystem | ✅ | ❌ | ❌ | |
| Vector search + GraphRAG tooling | ✅ | ❌ | ||
| Advanced analytics + SIMD focus | ✅ | |||
| Optional Event Sourcing / CQRS packages | ✅ | ❌ | ❌ |
dotnet add package SharpCoreDB --version 1.8.0using SharpCoreDB;
var db = new Database("app.scdb");
db.ExecuteSQL("CREATE TABLE Users (Id INT, Name TEXT)");
db.ExecuteBatchSQL([
"INSERT INTO Users VALUES (1, 'Ada')",
"INSERT INTO Users VALUES (2, 'Linus')"
]);
db.Flush();
db.ForceSave();dotnet run --project src/SharpCoreDB.Server -c ReleaseHealth endpoint: https://localhost:8443/health
gRPC endpoint: https://localhost:5001
Install client/server packages:
dotnet add package SharpCoreDB.Server --version 1.8.0
dotnet add package SharpCoreDB.Client --version 1.8.0- Synchronized package release across the full ecosystem (
1.8.0) - Auto-ROWID: tables without a
PRIMARY KEYnow get a hidden_rowid(ULID) column - SQLite-compatible rowid pattern - GRAPH_RAG SQL clause: new top-level
GRAPH_RAGSELECT syntax withLIMIT,WITH SCORE > X,WITH CONTEXT, andTOP_K - OPTIONALLY projection mode: new
OPTIONALLYkeyword enablesOption<T>mapping in ADO.NET readers - IS SOME / IS NONE predicates: new null-safety predicates supported in parser and runtime
- SIMD hot-loop optimization: all 16 columnar aggregate methods use
Vector256.LoadUnsafe- tighter codegen on AVX2 - Major Viewer update: multi-tab query editor, typed table designer (includes ULID/GUID), 6-language UI (EN/DE/FR/ES/IT/NL), server connection support
- FluentMigrator reliability fixes:
- default SQLite-compatible generator + processor alignment in
AddSharpCoreDBFluentMigrator() - no
UndefinedDefaultValueleakage in generated SQL - no duplicate
PRIMARY KEYgeneration for version table creation - SQLite-incompatible DDL now fails fast with clear
NotSupportedExceptionin default compatibility mode
- default SQLite-compatible generator + processor alignment in
- Single-file parser compatibility fixes: quoted identifiers in
CREATE TABLE/DROP TABLE/ table-level PK paths are covered and validated Microsoft.Extensions.Logging.Abstractionsupdated to 10.0.7 across all packages- 2,000+ tests passing, zero breaking changes intended, 100% backward compatible
Recent benchmark improvements after parser/lifecycle refactors:
| Benchmark | Before | After | Improvement |
|---|---|---|---|
| Single-File SELECT (Unencrypted) | 4.01 ms | 1.81 ms | 55% faster |
| Single-File SELECT (Encrypted) | 2.74 ms | 1.57 ms | 43% faster |
| AppendOnly UPDATE | 143.42 ms | 70.36 ms | 51% faster |
| Dir Encrypted UPDATE | 9.16 ms | 7.91 ms | 14% faster |
Additional SIMD optimization: columnar aggregate paths now use Vector256.LoadUnsafe to reduce per-iteration overhead in AVX2 hot loops.
Full benchmark details: docs/BENCHMARK_RESULTS.md
- Single-file encrypted database with AES-256-GCM
- SQL support with advanced query optimization
- ACID transactions with WAL
- B-tree and hash indexing
- Full-text search
- SIMD-accelerated operations (including
Vector256.LoadUnsafeoptimizations) - Memory pooling and JIT-oriented performance optimizations
- Metadata durability improvements (flush + reopen reliability)
- Primary protocol: gRPC over HTTPS (HTTP/2 + HTTP/3)
- Secondary protocols: Binary TCP handler, HTTPS REST API, WebSocket streaming
- Multi-database hosting with system databases
- Security stack: TLS 1.2+, JWT auth, RBAC (Admin/Writer/Reader), optional mTLS
- Connection pooling (1000+ concurrent connections)
- Health checks and Prometheus-compatible metrics
- Graceful shutdown and production deployment support
- Deployment options: Docker/Docker Compose, Windows Service, Linux systemd, macOS launchd
- .NET client library (
SharpCoreDB.Client, ADO.NET-style) - JavaScript/TypeScript SDK (npm)
- Python client (
PySharpDB) with partial transport parity in progress
- 100+ aggregate functions (COUNT, SUM, AVG, STDDEV, VARIANCE, PERCENTILE, CORRELATION)
- Window functions (ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD)
- Proven high-throughput analytics performance in benchmark suite
- HNSW indexing with SIMD acceleration
- Production-tested with large vector workloads (10M+ vectors)
- Performance-oriented semantic retrieval workflows
- Graph traversal: BFS, DFS, bidirectional search
- A* pathfinding improvements
ROWREFdata type support for graph edgesGRAPH_TRAVERSE()SQL function integration- Advanced graph analytics via
SharpCoreDB.Graph.Advanced:- Community detection (Louvain, Label Propagation, Connected Components)
- Centrality metrics (Degree, Betweenness, Closeness, Eigenvector, Clustering)
- Subgraph analysis (K-core, clique, triangle detection)
- Graph-aware semantic ranking and profiling helpers
- Multi-master replication with vector clocks
- Distributed transactions with 2PC protocol
- Dotmim.Sync integration for cloud/data sync scenarios
SharpCoreDB.EventSourcing:- Append-only per-stream event storage
- Global ordered event feed
- In-memory and persistent event store implementations
- Snapshot persistence and snapshot-aware aggregate loading
- Optional snapshot policy helpers
SharpCoreDB.Projections:- Projection registration and runner scaffolding
- Checkpoint persistence
- OpenTelemetry-ready projection metrics
SharpCoreDB.CQRS:- Command/handler abstractions
- Aggregate root support
- Outbox primitives with retry/dead-letter workflow support
- 2,000+ tests passing
- 100% backward compatible across the v1.8.0 release line
- Zero breaking changes intended from v1.5.0 to v1.8.0
For deep technical details (audit reports, threat model, runbooks, compatibility matrices), use the docs hub: docs/INDEX.md.
# Core
dotnet add package SharpCoreDB --version 1.8.0
# Server/client
dotnet add package SharpCoreDB.Server --version 1.8.0
dotnet add package SharpCoreDB.Client --version 1.8.0
# Engines and extensions
dotnet add package SharpCoreDB.Analytics --version 1.8.0
dotnet add package SharpCoreDB.VectorSearch --version 1.8.0
dotnet add package SharpCoreDB.Graph --version 1.8.0
dotnet add package SharpCoreDB.Graph.Advanced --version 1.8.0
dotnet add package SharpCoreDB.Distributed --version 1.8.0
dotnet add package SharpCoreDB.Provider.Sync --version 1.8.0
dotnet add package SharpCoreDB.EntityFrameworkCore --version 1.8.0
dotnet add package SharpCoreDB.Extensions --version 1.8.0
# Optional architecture packages
dotnet add package SharpCoreDB.EventSourcing --version 1.8.0
dotnet add package SharpCoreDB.Projections --version 1.8.0
dotnet add package SharpCoreDB.CQRS --version 1.8.0
# Optional functional adapters
dotnet add package SharpCoreDB.Functional --version 1.8.0
dotnet add package SharpCoreDB.Functional.Dapper --version 1.8.0
dotnet add package SharpCoreDB.Functional.EntityFrameworkCore --version 1.8.0- Auto-ROWID support: hidden
_rowid(ULID) on tables without an explicit primary key - mirrors SQLite rowid semantics - GRAPH_RAG SQL clause: first-class
GRAPH_RAGSELECT syntax for graph-augmented retrieval pipelines - OPTIONALLY and IS SOME / IS NONE: new SQL keywords for
Option<T>-aware null-safety patterns - SIMD columnar engine:
Vector256.LoadUnsafeacross all 16 aggregate hot paths - eliminates Span allocation in AVX2 loops - SharpCoreDB.Viewer major update: Avalonia UI revamp with multi-tab editor, typed table designer (ULID/GUID), multilingual UI (EN/DE/FR/ES/IT/NL), server-mode connection
- FluentMigrator:
AddSharpCoreDBFluentMigrator()defaults both generator and processor to SQLite-compatible mode Microsoft.Extensions.Logging.Abstractionsbumped to 10.0.7 for all packages- Bug fixes:
IS NULL/IS NOT NULLunification, parserCOALESCE()support, LINQ Convert/ConvertChecked, PAGE_BASED mixed-predicate filtering
- Documentation hub:
docs/INDEX.md - Project docs index:
docs/README.md - Feature matrix:
docs/FEATURE_MATRIX_v1.7.2.md - Server docs:
docs/server/README.md - Server quick start:
docs/server/QUICKSTART.md - GraphRAG docs:
docs/graphrag/00_START_HERE.md - SQL dialect extensions:
docs/sql/SQL_DIALECT_EXTENSIONS_v1.7.2.md - Migration docs:
docs/migration/README.md - Single-file SQL support and limits:
docs/storage/SINGLE_FILE_SQL_LIMITATIONS.md - EF Core provider docs:
src/SharpCoreDB.EntityFrameworkCore/README.md,src/SharpCoreDB.EntityFrameworkCore/USAGE.md - Optional architecture packages:
src/SharpCoreDB.EventSourcing/README.md,src/SharpCoreDB.Projections/README.md,src/SharpCoreDB.CQRS/README.md - Package publish/readme guidance:
nuget/README.md,NuGet.README.md
Contributions are welcome. Please open an issue for ideas, bug reports, and feature proposals, or submit a PR directly.
This project is licensed under the MIT License. See LICENSE for details.
Made with ❤️ for the .NET community