Dolt- A Version Controlled Database |
Written by Nikos Vaggalis |
Monday, 29 January 2024 |
A database that you can fork and clone, branch and merge, push and pull just like a git Repository. What is the use case for it? First of all Dolt , written in Go, might not be a fork of Mysql, but it acts a drop-in replacement, adhering to the Mysql protocol, but with versioning on top. The gist is that if a user didn't use any versioning features, then he wouldn't be able to tell that he isn't using a Mysql database anyway. And while starting out with Mysql, Dolt has recently also released Doltgres which does the same but for Postgres. So what does Dolt make different from the rest? Versioning. If you are familiar with Git then you'll be right at home. Like Git does branching, merging, diffing etc , the same you can do with your Dolt database. You can for instance fork the database and hand it over to someone else for developing, debugging, running analytics on it, do changes, even add new tables or data, and give it back for you to merge! Then, made a mistake and dropped a table? no problem roll it back, there's no need for retrieving it from tape backups. That's two use cases, but there's more. In PostgresML - Bring Your ML Workload To The Database, I described how that extension can be used to train and apply ML models Another very useful use case which I find very intriguing is auditing. Say a user inserts a row and then another user deletes it. Who deleted it? Since revisions of the data are always available and every change gets recorded, you can easily automate auditing without having to code explicitly for it, As a summary there's four key reasons to use database versioning:
With Dolt you have that effortlessly and at your fingerprints. In fact if you check Dolt's CLI you'll discover that it imitates Git commands:
DoltgreSQL strips out some of the Git for Data pieces like the CLI and builds directly for the version controlled database use case. With Doltgres, you can do everything with SQL, a familiar experience for Postgres users. Enough talks, let's see some code. To illustrate how you would initiate a commit, after you create tables 'teams', 'employees', 'employees_teams', you do: That simple. In conclusion, Dolt's mission is visionary. It has done something that no one else has; it streamlines many actions that once required a lot of effort to perform, and gives room for some that are still to be invented. .
More Information
Related ArticlesPostgresML - Bring Your ML Workload To The Database
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
Last Updated ( Monday, 29 January 2024 ) |