Migrating existing data and code from other engines. Deep dives:
docs/migration/README.md·docs/migration/MIGRATION_GUIDE.md·docs/migration/SQLITE_VECTORS_TO_SHARPCORE.md
- SQL dialect: SharpCoreDB implements a SQLite-compatible dialect subset —
INTEGER PRIMARY KEYrowid alias,_rowid,COLLATE,INSERT OR REPLACE-style semantics — so most DDL/DML ports with minimal changes. - Data: use the built-in migration tooling in
docs/migration/MIGRATION_GUIDE.mdto copy tables and rows programmatically. - Vectors: replace SQLite vector extensions with
SharpCoreDB.VectorSearch(SQLITE_VECTORS_TO_SHARPCORE.md). - Performance: switch hot read loops to
FindByPrimaryKey/ExecuteQueryStructand hot ingestion toInsertBatch— see the Performance Guide.
- Replace BSON document access with typed SQL tables and rows.
LiteCollection<T>.FindById→db.FindByPrimaryKey(table, key).InsertBulk→db.InsertBatch.- You gain SQL, encryption, vector search, and analytics you did not have.
- Embedded-first: use
SharpCoreDBdirectly, orSharpCoreDB.Serverfor the gRPC network layer. - RLS replaces per-document authorization filters.
- Document-centric schemas map cleanly to
TEXT/BLOBcolumns with a ULID PK.
Add versioned migrations to any SharpCoreDB database with the SharpCoreDB.FluentMigrator
package — see Providers.
- Port schema →
CREATE TABLE(keepINTEGER PRIMARY KEY/ ULID patterns for keys). - Port data via a scripted copy (per-table
ExecuteQuery+InsertBatch). - Re-create indexes (
CREATE INDEX, hash for point lookups, B-tree for ranges). - Switch hot loops to the v2.0 fast-path APIs.
- Run the comparative benchmark to confirm target numbers on your machine.