-
Notifications
You must be signed in to change notification settings - Fork 195
Description
Motivation
SeekDB already supports fork table, a lightweight table-level copy that preserves a consistent snapshot with minimal overhead and has proven useful in many scenarios (e.g., AI training datasets, A/B testing, and multi-version analytics). Building on this, we propose database-level fork: copying an entire database in one operation.
Proposed Solution
Similar to fork table, add a new ddl grammar:
FORK DATABASE origin_database TO forked_database;It selects a global snapshot and batch fork all the user tables in the database, maintaining the same semantics as fork table.
Vision
A FORK DATABASE command extends the existing fork-table capability to the database level: one operation creates an isolated, versioned copy of an entire database, reusing the same lightweight, snapshot-based semantics as FORK TABLE. Together, FORK TABLE and FORK DATABASE give users a consistent, Git-like way to version and branch data—at either table or database granularity—directly in the database. This makes rapid, versioned experimentation scalable not only for single tables but for full schemas and datasets, so that AI pipelines, multi-tenant copies, and development/test workflows can clone whole “data projects” with a single DDL command, without scripting multiple fork-table calls or sacrificing snapshot consistency.