

Ask HN: Please help me to understand how key/value stores can back databases? - hoodoof

Please explain it like I am five.<p>How is it that a simple key&#x2F;value store can be used as a backing store for a more sophisticated type of database?<p>I don&#x27;t see how the more complex data model of a graph database or a sql database maps down to keys and values.
======
brudgers
When my boy was five we watched _Monty Python and the Holy Grail_
together...many times since I bought the DVD. I wanted to make sure he could
blame me if he turned out to be a messed up adult.

There are times when it is useful to apply the Turing tarpit, a database is
still just bits in memory, there's no magic, just a well defined interface to
which some particular combination of code and data structure conforms.

A key is a pointer and a pointer is an edge in a graph. How the value is
interpreted determines is left to the implementor. If the value is interpreted
as a tuple and has a predetermined form, then you can get to a relational (or
SQL) database. If the value is interpreted as a pointer you can get to a graph
database. If the value is interpreted as a document you get some other sort of
database.

If you're really interested in databases, _Database Systems: the Complete
Book_ is an introductory text that I enjoyed last year. I picked up a used
copy of an older edition for less than $10 online.

[http://infolab.stanford.edu/~ullman/dscb.html](http://infolab.stanford.edu/~ullman/dscb.html)

