Relational DB • Good for recursive loose schema • Vertices for entities • Edges for relationships • Easy to add new entity types • Easy to add new relationships • Easy to traverse relationships • Good for flat strict schema • Tables for entities • Tables or FK for relationships • Easy to add new entity types • Easy to add new relationships • Hard to traverse relationships
Document DB • Loose schema with nester relations • Vertices for entities • Edges for relationships • Easy to add new entity types • Easy to add new relationships • Easy to traverse relationships • Loose schema with duplications • Document with all relations • Document per use case • Easy to add new entity types • Hard to add new relationships • Hard to traverse relationships
RDF Graphs • W3C Recommendation • widely used • not an xml, yay (the RDF documents can be xml) PREFIX foaf: <http:!//xmlns.com/foaf/0.1!/> SELECT ?name WHERE { ?person foaf:name ?name . }
Labeled Property Graphs • created by Neo4j • open sourced and widely available now • “SQL of Graph Databases” (striving to be) MATCH (node1:Label1)-[rel]!->(node2:Label2) WHERE node1.propertyA = {value} RETURN node2.propertyA, node2.propertyB
Labeled Property Graphs • Apache Project • open sourced and used for many different databases and processors • very similar to Cypher, but I found tooling and documentation poorer g.V().has("name","gremlin"). out("knows"). out("knows"). values("name")
AWS Native Service • Managed • LPG & RDF • Query languages: SPARQL, Gremlin (can do Cypher) • ACID: YES • Limitation: 64TB of data • Proprietary and vendor locked (but compatible) • Do not have dev env (use compatible services) • AWS Marketplace Solution • Hosted (support can be bought) • LPG (RDF via community plugin) • Query language: Cypher • ACID: YES? • Limitation: 34.4B of nodes • Open source and graph native • Have dev env (native or docker) Neo4j Enterprise
vs Neo4j Enterprise • Pay as you go, no upfront cost • $0.30..$5.50 per hour (compute) • $0.10 per month (per GB store) • $0.20 per 1 million of requests • backups, replication, disaster recovery included • No upfront cost (check license) • pay for compute resource used • pay for storage used • pay for network traffic • commercial support is very expensive (reportedly ~$200k), need devops to maintain