[Israel.pm] Reflections on Version Control Systems (VCSes) vs. Databases
shlomif at shlomifish.org
Wed Sep 7 10:21:19 PDT 2011
in the last Tel Aviv Perl Mongers meeting, when Sawyer discussed the internal
working of version control systems (= VCSes), he said something that "And don't
worry, a database is not involved anywhere there.", and then I said that I'm
aware of some version control systems that are using databases, and I believe
he said "OK, then I'll know not to use them.".
I'd like to explain why your favourite version control system is most probably
using a database of some sort and why it's perfectly OK.
First of all, what is a database? I recall reading this section from Pratical
There they say that even a simple Perl hash variable (called "dictionaries",
"maps" or "associative arrays" elsewhere) is a database-of-sorts, because it
allows for fast lookup and update of multiple data (= plural of datum), and
there are some on-disk databases such as Berkeley DB, and Tokyo Cabinet that
also implement a simple key/value store for on-disk access.
Since a version control system need to keep track of more than one datum, it
likely needs to implement some sort of database, either internally or
alternatively make use of one or more database packages. We can think of the
UNIX files/directories tree as a database as well.
And indeed some version control systems have utilised some
1. Early versions of Subversion used Berkeley DB for its on-disk storage. This
scheme was found to be somewhat inadequate due to some limitations of BDB, and
instead a different FSFS (Filesystem-on-filesystem) built-in database was
2. This FSFS now makes use of SQLite, an on-disk SQL database for doing
3. The SQLite people have implemented a DVCS called Fossil based on SQLite -
4. ClearCase makes use of a database called Raima.
5. The Subversion people used to have a long term of implementing a completely
SQL backend to Subversion.
And like I said, even if a version control system does not make use of a
published database, it probably implemented something of its own.
So there's nothing to worry about here.
Shlomi Fish http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman
Chuck Norris wrote a complete Perl 6 implementation in a day, but then
destroyed all evidence with his bare hands, so no‐one will know his secrets.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
More information about the Perl