Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The Graph Space

The graph space can be split along two axes: by usage and by data model.

By Usage

graph TD
    GraphTech[Graph Technologies] --> GDB[Graph Databases]
    GraphTech --> GCE[Graph Compute Engines]
    GDB --> OLTP["Transactional / real-time<br>(like OLTP in relational world)"]
    GCE --> OLAP["Batch analytics<br>(like data mining / OLAP)"]
  • Graph databases: The graph equivalent of a regular OLTP database.

    • Always running.
    • Always serving low-latency reads/writes with full ACID guarantees.
    • Used as the primary data store by an application.

    This is the main focus of this book.

  • Graph compute engines - for offline batch analytics over graph data (similar to data mining/OLAP).

By Data Model

Three dominant graph data models exist:

  • Property graph - the most popular, used by most graph databases. Covered throughout this book.
  • RDF triples - Resource Description Framework, common in semantic web.
  • Hypergraphs - a single edge can connect more than two nodes at once.

Property Graph vs RDF

Both represent data as nodes + named edges and can model the same data. The differences are in conventions and ecosystem:

Property GraphRDF
PropertiesKey-value pairs directly on nodes and edgesExtra triples (e.g. Alice --hasAge--> 30)
RelationshipsFirst-class, can hold propertiesTriples - adding metadata to a relationship requires extra nodes
SchemaAd-hoc, no predefined schemaFormal ontologies (OWL/RDFS)
Optimized forFast traversal, app queriesSemantic reasoning, cross-org interoperability
Query languageCypher, GremlinSPARQL

Property graphs trade semantic rigor for compactness and speed. RDF trades compactness for global interoperability and machine reasoning.

RDF’s formal ontologies (OWL/RDFS) enable automatic inference - the system derives new facts from existing data without custom code. For example, given Dog subclassOf Animal and Rex type Dog, an RDF store infers Rex type Animal. You could build similar reasoning on a property graph, but it would be custom logic rather than a standardized format other systems understand.