Website/Slides: oren.github.io
Twitter: @oreng
Feedback: orengolan@gmail.com
Finding extended friends in a relational database vs graph database.
Depth | RDBMS execution time | Graph execution time | Records returned |
---|---|---|---|
2 | 0.01 sec | 0.01 sec | 2500 |
3 | 30 sec | 0.16 sec | 110,000 |
4 | 1543 sec | 1.3 sec | 600,000 |
5 | Unfinished | 2.1 sec | 800,000 |
Reduce the cost of change
First commit | 2002 |
---|---|
Language | Java |
Type | Property graph |
Pluggable backend | No |
Query language | Cypher and Gremlin |
License and price | Community edition - GPL 3, free |
Enterprise edition - AGPL 3, 20k a year | |
Created by | Neo4j, Swedish company. HQ in Silicon Valley |
Community | Large - books, events, training, IRC, Slack |
Time to first hello world | 10 minutes |
First commit | 2012 |
---|---|
Language | Java |
Type | Property graph |
Pluggable backend | Yes - Cassandra, HBase, BerkeleyDB, Amazon DynamoDB |
Query language | Gremlin |
License and price | Apache 2, free |
Created by | Aurelius, startup which got acquired by DataStax. DataStax's HQ is in San Francisco |
Community | Medium - Google group |
Time to first hello world | a few hours |
First commit | 2014 |
---|---|
Language | Go |
Type | RDF (triple) store |
Pluggable backend | Yes - LevelDB, Bolt, PostgreSQL, MongoDB, in-memory |
Query language | Javascript, with a Gremlin-inspired graph object |
License and price | Apache 2, free |
Created by | Ex-Googlers that were part of Freebase and Google Knowledge Graph |
Community | Small - Google group, IRC, Slack |
Time to first hello world | 1 minute |
character:ice-king "has a crush on" character:princess-bubblegum .
character:ice-king "has a crush on" character:marceline-abadeer .
Subject Predicate Object
g.V("character:ice-king").Out("has a crush on").All()
{
"result": [ {
"id": "character:marceline-abadeer"
},
{
"id": "character:princess-bubblegum"
}
]
}
g.V("character:princess-bubblegum").In("has a crush on").All()
{
"result": [ {
"id": "character:ice-king"
}
]
}
cayley load --config=cayley.cfg --quads=db.nq
g.V().In("hates").All()
g.V().In("hates").All()
{
"result": [
{
"id": "character:lumpy-space-princess",
},
{
"id": "character:bmo",
},
{
"id": "character:marceline-abadeer",
},
{
"id": "character:finn",
},
{
"id": "character:lady-rainicorn",
},
{
"id": "character:princess-bubblegum",
},
{
"id": "character:jake",
}
]
}
g.V().Tag("name").In("hates").All()
{
"result": [
{
"id": "character:lumpy-space-princess",
"name": "character:ice-king"
},
{
"id": "character:bmo",
"name": "character:ice-king"
},
{
"id": "character:marceline-abadeer",
"name": "character:ice-king"
},
{
"id": "character:finn",
"name": "character:ice-king"
},
{
"id": "character:lady-rainicorn",
"name": "character:ice-king"
},
{
"id": "character:princess-bubblegum",
"name": "character:ice-king"
},
{
"id": "character:jake",
"name": "character:ice-king"
}
]
}
g.V().Has("hates", "character:ice-king"").All()
{
"result": [
{
"id": "character:lumpy-space-princess"
},
{
"id": "character:bmo"
},
{
"id": "character:marceline-abadeer"
},
{
"id": "character:finn"
},
{
"id": "character:lady-rainicorn"
},
{
"id": "character:princess-bubblegum"
},
{
"id": "character:jake"
}
]
}
haters = g.V().In("hates")
lives_with_bmo = g.V("character:bmo").In("lives with")
haters.And(lives_with_bmo).All()
haters = g.V().In("hates")
lives_with_bmo = g.V("character:bmo").In("lives with")
haters.And(lives_with_bmo).All()
{
"result": [
{
"id": "character:finn"
},
{
"id": "character:jake"
}
]
}
Website: oren.github.io
Feedback: orengolan@gmail.com
Slides from this presentation: Here