SharpCoreDB 2.0.0.1
dotnet add package SharpCoreDB --version 2.0.0.1
NuGet\Install-Package SharpCoreDB -Version 2.0.0.1
<PackageReference Include="SharpCoreDB" Version="2.0.0.1" />
<PackageVersion Include="SharpCoreDB" Version="2.0.0.1" />
<PackageReference Include="SharpCoreDB" />
paket add SharpCoreDB --version 2.0.0.1
#r "nuget: SharpCoreDB, 2.0.0.1"
#:package SharpCoreDB@2.0.0.1
#addin nuget:?package=SharpCoreDB&version=2.0.0.1
#tool nuget:?package=SharpCoreDB&version=2.0.0.1
SharpCoreDB v2.0.0.1 β Performance-First Database Engine
High-Performance Embedded AND Networked Database for .NET 10
SharpCoreDB is a modern, encrypted, file-based database engine with SQL support, built for production applications. Now available as both embedded database and network server.
What's New in 2.0.0.1
π Performance-first engine
- v2.0 closes the v1.x benchmark gap: point reads beat SQLite on the default engine, batch INSERTs are at parity, and the WP10βWP13 storage-engine work narrowed single-row UPDATE/DELETE to ~1β2x SQLite.
- Zero-allocation struct-row SQL reads via
ExecuteQueryStruct. - Batch UPDATE / READ / INSERT fast paths: position-aware batch
UPDATE, zero-deserialize in-place field patches, direct hash-index point lookups and memoized SQL normalization (B7βB9).
π Envelope encryption + full at-rest encryption
- Password-based key model:
DatabaseOptions.EncryptionPasswordcreates a random per-file data-encryption-key (DEK) wrapped by a PBKDF2-HMAC-SHA256-derived key (per-file salt, OWASP-2024 iteration default). RawEncryptionKeymode remains fully supported. - Full at-rest metadata encryption (beyond issue #341's block data): the block registry,
free-space map and WAL are encrypted too (
EncryptionMode = 2), so block/table names, offsets, lengths and allocation patterns are not visible in plaintext on disk. - Key & password rotation:
IDatabase.ChangeEncryptionPasswordAsync(...)re-wraps the DEK (O(1), no data rewrite);IDatabase.RotateEncryptionKeyAsync(...)fully re-keys the database via a crash-safe temp-file swap. - Wrong key/password now fails loudly at open (GCM authentication failure).
π¦ Block-level compression (Issue #344)
- Transparent per-block Brotli / GZip / Zstd compression for single-file (
.scdb) storage β applied before encryption on write, removed after decryption on read. - Configurable presets:
DatabaseOptions.BlockCompressionLevel/MetadataCompressionLevel(Fastest,Optimal,SmallestSize);CompressionThresholdcontrols the minimum block size. - Compressed and uncompressed blocks can coexist in one file; defaults to
None(backward compatible). - New options:
DatabaseOptions.BlockCompression,CompressionThreshold,BlockCompressionLevel.
βοΈ Configurable metadata sizing (Issue #345)
- The FSM, Block Registry and Table Directory are no longer hard-coded to 4 pages:
FsmSizePages,BlockRegistrySizePagesandTableDirectorySizePagessupport databases beyond 512 MB. - Minimum file extension is now byte-based (~10 MB) regardless of
PageSize.
π Key Features
β
Embedded Database - Single-file storage, no server required
β
Network Server Mode - gRPC/HTTP/WebSocket protocols (NEW!)
β
Encrypted - AES-256-GCM encryption built-in
β
SQL Support - Full SQL syntax, prepared statements
β
High Performance - 6.5x faster than SQLite for bulk operations
β
Modern C# 14 - Latest language features, NativeAOT ready
β
Cross-Platform - Windows, Linux, macOS, ARM64 native
β
Production Ready - 1,468+ tests, zero known critical bugs
β
Multi-Language - .NET, Python, JavaScript/TypeScript clients
π Performance
- Bulk Insert (1M rows): 2.8 seconds
- Analytics (COUNT 1M): 682x faster than SQLite
- Vector Search: 50-100x faster than SQLite
- Metadata Compression: <1ms overhead
- gRPC Query Latency: 0.8-1.2ms (p50)
- Concurrent Connections: 1000+ (server mode)
π Package Ecosystem
This package installs the core database engine. Extensions available:
Functional Programming (NEW in v1.9.6):
- SharpCoreDB.Functional - Functional faΓ§ade with
Option<T>,Fin<T>, andSeq<T>-style APIs - SharpCoreDB.Functional.Dapper - Functional Dapper adapter module
- SharpCoreDB.Functional.EntityFrameworkCore - Functional EF Core adapter module
Server Mode (NEW!):
- SharpCoreDB.Server - Network database server with gRPC/HTTP/WebSocket
- SharpCoreDB.Client - .NET client library (ADO.NET-style)
Analytics & Search:
- SharpCoreDB.Analytics - 100+ aggregate & window functions (150-680x faster)
- SharpCoreDB.VectorSearch - SIMD-accelerated semantic search (50-100x faster)
- SharpCoreDB.Graph - Lightweight graph traversal (30-50% faster)
Distributed Features:
- SharpCoreDB.Distributed - Multi-master replication, sharding, transactions
- SharpCoreDB.Provider.Sync - Dotmim.Sync integration (bidirectional sync)
Optional Integrations:
- SharpCoreDB.EntityFrameworkCore - EF Core provider
- SharpCoreDB.Extensions - Helper methods and utilities
- SharpCoreDB.Serilog.Sinks - Database logging sink
π Multi-Language Support
Python Client (PyPI):
pip install pysharpcoredb
JavaScript/TypeScript (npm):
npm install @sharpcoredb/client
π Documentation
Full docs: https://github.com/MPCoreDeveloper/SharpCoreDB/blob/master/docs/INDEX.md
Server Quick Start: https://github.com/MPCoreDeveloper/SharpCoreDB/blob/master/docs/server/QUICKSTART.md
Canonical package docs:
π» Quick Example
using SharpCoreDB;
// Create database
var factory = new DatabaseFactory();
var db = factory.Create("myapp.scdb", "master-password");
// Execute SQL
db.ExecuteSQL("CREATE TABLE users (id INT PRIMARY KEY, name TEXT)");
db.ExecuteSQL("INSERT INTO users VALUES (1, 'Alice')");
// Query data
var results = db.ExecuteQuery("SELECT * FROM users WHERE id = 1");
foreach (var row in results)
{
Console.WriteLine($"{row["id"]}: {row["name"]}");
}
db.Flush(); // Persist to disk
π Production Features
- ACID Compliance - Full transaction support with WAL
- Backup & Recovery - Point-in-time recovery, checkpoint management
- Concurrency - Thread-safe operations, connection pooling
- Multi-Tenant - Row-level security, schema isolation
- Enterprise Sync - Bidirectional sync with PostgreSQL, SQL Server, MySQL
- Monitoring - Health checks, metrics, performance stats
π Security
- AES-256-GCM encryption for sensitive data
- Password-based key derivation (PBKDF2)
- No plaintext passwords or keys in memory
- Audit logging support
π Performance Optimizations
- Tiered JIT with PGO (1.2-2x improvement)
- SIMD vectorization where applicable
- Memory-mapped I/O for fast reads
- Batched writes for high throughput
- Query plan caching
π οΈ Use Cases
- Time Tracking Apps - Embedded, encrypted, offline-first
- Invoicing Systems - Multi-tenant, backup-friendly
- AI/RAG Agents - Vector search, knowledge base
- IoT/Edge Devices - ARM64 native, minimal footprint
- Mobile Apps - Sync with cloud database
- Desktop Applications - Single-file deployment
π¦ Installation
dotnet add package SharpCoreDB --version 2.0.0.1
Optional companion packages:
dotnet add package SharpCoreDB.Functional --version 2.0.0.1
dotnet add package SharpCoreDB.Functional.Dapper --version 2.0.0.1
dotnet add package SharpCoreDB.Functional.EntityFrameworkCore --version 2.0.0.1
dotnet add package SharpCoreDB.Graph.Advanced --version 2.0.0.1
π Upgrading from v1.9
Backward compatible for existing databases β with one important note:
- Directory-storage databases open unchanged (the table file format is byte-for-byte identical).
- Single-file (
.scdb) databases are migrated automatically to the v2 dynamic-metadata format on first open; the original file is preserved as<file>.backup. The migration is one-way β after opening with v2.0.0.1 the file can no longer be read by v1.9 (use the.backupfor a v1.9 copy). - The public API is additive (
EncryptionPassword,BlockCompressionLevel,MetadataCompressionLevel,BlockCompressionMode.Zstd, β¦) β existing application code compiles and runs unchanged.
π Bug Reporting
Found an issue? Report it on GitHub: https://github.com/MPCoreDeveloper/SharpCoreDB/issues
π License
MIT License - See LICENSE file in the repository
π Contributing
We welcome contributions! Check the repository for contribution guidelines.
Latest Version: 2.0.0.1 (September 2026)
Target: .NET 10 / C# 14
Tests: 1,700+ (100% passing)
Status: β
Stable β performance-first v2.0.0 release
Versioning: SharpCoreDB now uses 4-part versions (n.n.n.n).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.ObjectPool (>= 10.0.11)
NuGet packages (16)
Showing the top 5 NuGet packages that depend on SharpCoreDB:
| Package | Downloads |
|---|---|
|
SharpCoreDB.VectorSearch
Vector search extension for SharpCoreDB β SIMD-accelerated similarity search with HNSW indexing. Pure managed C# 14, zero external dependencies, NativeAOT compatible. |
|
|
SharpCoreDB.Extensions
Extensions for SharpCoreDB including Dapper integration and ASP.NET Core health checks. Built for .NET 10 with C# 14. Supports Windows, Linux, macOS, Android, iOS, and IoT/embedded devices with platform-specific optimizations. |
|
|
SharpCoreDB.Data.Provider
Data provider layer for SharpCoreDB on .NET 10. |
|
|
SharpCoreDB.EntityFrameworkCore
Entity Framework Core provider for SharpCoreDB encrypted database engine. Built for .NET 10 with C# 14. Supports Windows, Linux, macOS, Android, iOS, and IoT/embedded devices with platform-specific optimizations. Compatible with SharpCoreDB 1.7.1. |
|
|
SharpCoreDB.Serilog.Sinks
A Serilog sink for SharpCoreDB - a lightweight, encrypted, file-based database. Features efficient batch logging with AES-256-GCM encryption, AppendOnly storage engine for maximum write speed, and full async support. Compatible with SharpCoreDB 1.7.1+. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0.1 | 0 | 9/1/2026 |
| 2.0.0 | 39 | 9/1/2026 |
| 2.0.0-preview.3 | 82 | 8/30/2026 |
| 2.0.0-preview.2 | 60 | 8/30/2026 |
| 2.0.0-preview.1 | 67 | 8/29/2026 |
| 1.9.9 | 133 | 8/30/2026 |
| 1.9.8 | 162 | 8/29/2026 |
| 1.9.7 | 146 | 8/29/2026 |
| 1.9.6 | 186 | 8/28/2026 |
| 1.9.5 | 208 | 8/27/2026 |
| 1.9.4 | 326 | 8/22/2026 |
| 1.9.3 | 406 | 7/28/2026 |
| 1.9.2 | 399 | 6/7/2026 |
| 1.9.1 | 320 | 5/21/2026 |
| 1.9.0 | 322 | 5/20/2026 |
| 1.8.0 | 371 | 4/29/2026 |
| 1.7.2 | 318 | 4/28/2026 |
| 1.7.1 | 302 | 4/26/2026 |
| 1.7.0 | 242 | 4/19/2026 |
| 1.6.0 | 1,978 | 3/23/2026 |
v2.0.0 (performance-first): removes debug file logging from all hot paths (SELECT, parameterized ExecuteSQL, batch transactions, INSERT) that caused per-operation disk I/O and throttled point reads/updates/deletes. See docs/performance/V2_PERFORMANCE_PLAN.md for the v2.x performance roadmap: prepared/compiled query execution, allocation reduction, storage/index tuning, and C# 15 / .NET 11 readiness.