# Version Control for your Application

## Problem

* Do your customers want branches and merges in your application?
* Do your customers want to review changes in your application before they go live?
* Do you want to add a pull request workflow to your application?
* Do you want to expose audit log functionality in your application?
* Do you want to expose rollback functionality in your application?

## Dolt solves this by…

If you have an application that would benefit from [branches](https://docs.dolthub.com/concepts/dolt/git/branch), [merges](https://docs.dolthub.com/concepts/dolt/git/merge), [diffs](https://docs.dolthub.com/concepts/dolt/git/diff), [logs](https://docs.dolthub.com/concepts/dolt/git/log), and human review of changes, you can use Dolt to power that application. Dolt gives you branch, diff, and merge at the database layer.

Programmatically access git functionality via [procedures](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-procedures), [system tables](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables), and [functions](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-functions). Programmatic control of Git operations combined with the ability to use [standard SQL](https://docs.dolthub.com/concepts/dolt/sql) creates the ideal foundation to add version control to your application.

Dolt ships with standard [RDBMS](https://docs.dolthub.com/concepts/dolt/rdbms) tools like [replication](https://docs.dolthub.com/concepts/dolt/rdbms/replication) and [backups](https://docs.dolthub.com/concepts/dolt/rdbms/backups). Run Dolt with a hot standby and failover just like MySQL or Postgres.

[Hosted Dolt](https://hosted.doltdb.com/) is a hosted version of Dolt that works like AWS RDS. Let us worry about operating Dolt in the cloud. Write your application against a cloud endpoint.

In the past applications that needed these features required [slowly changing dimension](https://www.dolthub.com/blog/2021-09-17-database-version-control/) or [soft deletes](https://www.dolthub.com/blog/2022-11-03-soft-deletes/). These approaches are cumbersome and do not support merge. Dolt gives application the full development power of Git.

## Dolt replaces

### Soft Deletes

A common technique to version your database is to use [soft deletes](https://www.dolthub.com/blog/2022-11-03-soft-deletes/). When your application would make an update or a delete, you application instead makes an insert and marks the old row invalid. Dolt obviates the need for this technique. You can keep your existing database schema and Dolt ensures every write is non-destructive. Queries against soft deleted rows become Dolt history queries against [system tables](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables).

### Slowly Changing Dimension

A more advanced technique for versioning databases is [slowly changing dimension](https://www.dolthub.com/blog/2023-06-22-slowly-changing-dimension/). Slowly Changing Dimension is similar to soft deletes. Additional database columns are added to tables to manage versioning. Dolt is slowly changing dimension on every table by default. Queries involving the slowly changing dimension become Dolt history queries against [system tables](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables). Moreover, complicated [merge](https://docs.dolthub.com/concepts/dolt/git/merge) processes can happen at the database layer. Merges must handled by custom code at the application layer with slowly changing dimension.

## Companies Doing This

* [Threekit](https://www.threekit.com/)
* [Network To Code](https://www.networktocode.com/)
* [FJA](https://www.fja.com/)
* [Idearoom](https://www.idearoom.com/)

## Case Studies

* [Nautobot by Network To Code](https://www.dolthub.com/blog/2021-11-19-dolt-nautobot/)
* [Turbine](https://www.dolthub.com/blog/2022-08-17-dolt-turbine/)

## Other Related Articles

* [Django and Dolt](https://www.dolthub.com/blog/2021-06-09-running-django-on-dolt/)
* [Django and Dolt Part II](https://www.dolthub.com/blog/2021-08-27-django-dolt-2/)
* [Using SQLAlchemy for Dolt Time Travel](https://www.dolthub.com/blog/2023-04-12-dolt-sqlalchemy/)
* [How we built the Hosted Dolt Workbench](https://www.dolthub.com/blog/2022-08-24-hosted-sql-workbench/#how-it-was-built)
* [So you want Database Version Control?](https://www.dolthub.com/blog/2021-09-17-database-version-control/)
* [So you want Soft Deletes](https://www.dolthub.com/blog/2022-11-03-soft-deletes/)
* [Getting Started: Dolt and SQLAlchemy](https://www.dolthub.com/blog/2023-07-12-sql-alchemy-getting-started/)
* [Using SQLAlchemy for Dolt Time Travel](https://www.dolthub.com/blog/2023-04-12-dolt-sqlalchemy/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dolthub.com/introduction/use-cases/vc-your-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
