All Resources
R-81
Technology
Tessera DB Tutorial: Branch Your Data Like You Branch Code
Lightweight copy-on-write branches let you run experiments, schema changes, or what-if analyses on a fork of your live data without touching the original.
PAR2 Labs
August 29, 2026
3 min

Database branching is what version control did for code: fork the data, experiment, merge back if it worked. Tessera implements it as copy-on-write — only the entities you modify live on the branch; everything else is read straight through from the parent.
01
Step 1: Create a branch
Starting from your main line, create a named branch and switch to it. From then on, any write you do lands on the branch, and reads see the branch's changes layered on top of the parent.
02
Step 2: Make changes on the branch
Insert experimental facts, adjust entities, whatever the experiment needs. When you reach a milestone, commit a versioned checkpoint with a message describing what changed — so you can come back to exactly this state later.
03
Step 3: Compare branches
Diff the branch against its parent to see precisely which entities changed and how. This is your review step before deciding whether the experiment was worth keeping.
If it didn't, just delete the branch — main was never touched.
04
Step 4: Merge or discard
If the experiment worked, switch back to main, merge the branch's changes in, and delete the branch. If it didn't, just delete the branch — main was never touched.
05
What you can do per branch
Create a branch and switch between branches.
Commit a versioned checkpoint with a message.
Diff a branch to see what's changed.
Merge one branch's changes into another.
Delete a branch (you can't delete the main or the active branch).
06
Where branching fits
Branching is a power tool — great for migrations, A/B tests, and exploratory work — but not a substitute for transactions. ACID guarantees apply to writes on the active branch, not to cross-branch operations.
Key Takeaways
01
Created a named branch and switched to it, so writes land on the branch and reads fall through to the parent.
02
Committed a versioned checkpoint with a message at a milestone.
03
Diffed the branch against its parent to review what changed.
04
Merged the branch back into main, or deleted it and left main untouched.
PAR2 Labs · Technology
Work With Us