Graph Database

  • Represents data using graphs
  • Consist of Vertices and Edges

Graph Database Models

  • Property Graph model
    • Vertex:
      • ID
      • Properties (key-value pairs)
      • Outgoing edges
      • Incoming edges
    • Edge:
      • ID
      • Properties (key-value pairs)
      • Label (Relationship)
      • Head Vertex
      • Tail Vertex
    • Used by: Neo4j, Titan, InfiniGraph, JanusGraph
  • Triple Store model
    • (Subject, predicate, Object)
      • Object can be primitive
        • Example: (Lucy, age, 33)
      • Object can be Vertex
        • Example: (Lucy, marriedTo, Alain)
    • Used by: Datomic, AllegroGraph

Query Languages

  • Datalog
    • oldest
    • used in Datomic DB
  • Cypher
    • used in Neo4j DB
  • SPARQL
    • SPARQL Protocol And RDF Query Language
    • Query Language for triple stores using RDF model
    • Inspired by Cypher
  • Gremlin
    • used in JanusGraph

Apache TinkerPop