about
is that the question ?
etc etc
{key, value}
(although, more complex data structures are often built on top of this...)
Comes in many flavors:
kv Cache
kv Store
kv Store (Eventually Consistent)
kv Store (Ordered)
...
Uses 'tuples' to store data, almost always distributed
<Article>
<Author>
<FirstName>Bob</FirstName>
<Surname>Smith</Surname>
</Author>
<Abstract>This paper concerns....</Abstract>
<Section n="1"><Title>Introduction</Title>
<Para>...
</Section>
</Article>
{
"_id" : 1,
"name" : { "first" : "John", "last" : "Backus" },
"contribs" : [ "Fortran", "ALGOL", "Backus-Naur Form", "FP" ],
"awards" : [
{
"award" : "W.W. McDowell Award",
"year" : 1967,
"by" : "IEEE Computer Society"
},
{ "award" : "Draper Prize",
"year" : 1993,
"by" : "National Academy of Engineering"
}
]
}
To be Schemaful or Schemaless...
Data Model | Performance | Scalability | Flexibility | Complexity | Functionality |
---|---|---|---|---|---|
Key–Value Store | high | high | high | none | variable (none) |
Column-Oriented Store | high | high | moderate | low | minimal |
Document-Oriented Store | high | variable (high) | high | low | variable (low) |
Graph Database | variable | variable | high | high | graph theory |
Relational Database | variable | variable | low | moderate | relational algebra |
Leonhard Euler, 1707-1783
Formally, a graph is just a collection of vertices and edges
or
a set of nodes and the relationships that connect them.
nodes and relationships,
+ properties. (and labels)
MATCH (m:Movie)<-[:ACTS_IN]-(actor)-[:ACTS_IN]->(movie)
RETURN movie.title, collect(actor.name), count(*) AS count
ORDER BY count DESC ;
MATCH (node) -[:RELATIONSHIP]- (node)
MATCH (you:Person { name:"Your Name" }), (kevin:Person { name:"Kevin Bacon" }),
path = shortestPath((you)-[*..6]-(kevin))
RETURN path
() -[]- ()
try it yourself, it's easy !