kota's memex

There are a few different broad concepts which database implementations can be categorized under. Each with their own performance characteristics and ideal use cases.

key-value databases

The simplest conceptually is a key-value database.

Every data element in the database is stored as a key value pair consisting of an attribute name (or "key") and a value. In a sense, a key-value store is like a relational database with only two columns: the key or attribute name (such as state) and the value (such as Alaska).

There are a wide range of key-value databases, sometimes referred to as "NoSQL" databases. In some cases the value will have a type associated with it, but in many cases it is just a blob of data.

Although you can use one for just about anything, the ideal use cases are a bit more limited. The best use case is something like a cache of similar data which needs fetched quickly. As soon as you start needing to store different types of data and fetching different values about or from the relationships between them you're better off with a relational database.

relational databases

The model used by standard sql databases.

graph databases

A graph database focuses on the relationship between data elements. Each element is stored as a node (such as a person in a social media graph). The connections between elements are called links or relationships. In a graph database, connections are first-class elements of the database, stored directly. In relational databases, links are implied, using data to express the relationships.