Dolt lets users collaborate on databases in the same way they collaborate on source code. Dolt is a relational database combined with the version control concepts of Git.
DoltHub is GitHub for Dolt, a place on the internet to share Dolt repositories. https://www.dolthub.com
Why Dolt? To pay homage to Git! Linus Torvalds famously said he names his products after himself, Linux and Git. Git is British slang for idiot. We needed a word that meant idiot that started with 'D' for data that was short enough to type on the command line. Hence, Dolt.
Dolt receives regular binary releases for Windows, macOS and Linux which are
available at https://github.com/liquidata-inc/dolt/releases. The ./bin
directory of your platforms tarball should be placed on your path so you can
run dolt
.
Installing from source requires Go 1.13+. Using go install:
$ go install github.com/liquidata-inc/dolt/go/cmd/dolt
$ go install github.com/liquidata-inc/dolt/go/cmd/git-dolt
$ go install github.com/liquidata-inc/dolt/go/cmd/git-dolt-smudge
Or from a checkout of the repository:
$ cd go
$ go install ./cmd/dolt
$ go install ./cmd/git-dolt
$ go install ./cmd/git-dolt-smudge
Setup your name and email by running:
$ dolt config --global --add user.email YOU@DOMAIN.COM
$ dolt config --global --add user.name "YOUR NAME"
Make a directory with nothing in it, initialize a dolt repository, and create a schema:
$ mkdir first_dolt_repo
$ cd first_dolt_repo
$ dolt init
Successfully initialized dolt data repository.
$ dolt sql -q "create table state_populations ( state varchar, population int, primary key (state) )"
$ dolt sql -q "show tables"
+-------------------+
| tables |
+-------------------+
| state_populations |
+-------------------+
$ dolt sql -q 'insert into state_populations (state, population) values
("Delaware", 59096),
("Maryland", 319728),
("Tennessee", 35691),
("Virginia", 691937),
("Connecticut", 237946),
("Massachusetts", 378787),
("South Carolina", 249073),
("New Hampshire", 141885),
("Vermont", 85425),
("Georgia", 82548),
("Pennsylvania", 434373),
("Kentucky", 73677),
("New York", 340120),
("New Jersey", 184139),
("North Carolina", 393751),
("Maine", 96540),
("Rhode Island", 68825)
'
$ dolt add .
$ dolt commit -m 'adding state populations from 1790.'
Now you can interact with the repository, as in dolt log
or dolt sql -q "select * from state_populations"
.
The implementation of Dolt makes use of code and ideas from noms.
Dolt is licensed under the Apache License, Version 2.0. See LICENSE for details.