liveBook · Manning

Property graph

As explained in Graph Algorithms for Data Science

A property graph is a graph model in which nodes and relationships can carry properties and relationships connect nodes rather than other relationships.

A property graph represents a domain as nodes, relationships, labels, and properties. Nodes represent entities; relationships connect adjacent nodes and carry semantic meaning. section 2.2.1 section 2.5

Model the domain with these building blocks:

  • Use node labels to express roles such as Person or Organization, and store node values as key-value properties. section 2.2.1
  • Use typed, directed relationships to express meaning; relationship properties can store values such as a starting date. section 2.2.1
  • Represent graph structure in Cypher with parentheses for nodes and square brackets for relationships: (:Node)-[:RELATIONSHIP]-(). section 2.5
  • Keep one directed relationship when direction adds no semantic value, rather than duplicating an undirected connection. section 2.2.1 section 2.5

Representing a Twitter network

Start with the questions or insights the analysis should support, then describe the domain. A Twitter model can include users following users, users publishing tweets, and users retweeting posts. These activities become graph structures that can later support pattern retrieval, aggregation, and network analysis. section 2.3 section 2.0

(:Person {name:"Tomaz"})<-[:WRITES_FOR {since:2020}]-(:Organization {name:"Manning Publications"})

Use the compact Cypher example to see labels, node properties, relationship type, direction, and a relationship property together. section 2.2.1

Graph modeling is iterative: decide whether domain values belong in properties or separate nodes, visualize the schema, and refine it as analysis needs become clearer. section 2.5

How Graph Algorithms for Data Science covers it

How deep it goes
Defines LPG components, direction, properties, notation, and modeling choices, then stops short of comparing graph models.
Examples
Uses people, organizations, friendship, employment, fraud, class hierarchies, and Twitter follower, tweet, and retweet networks.
What it assumes
Assumes a domain or dataset to model and teaches graph terminology, structure, and modeling decisions from basic concepts.
What you can do after
Build it from scratch by translating a domain into labeled nodes, typed relationships, properties, and Cypher representations.
How it connects
Connects property graphs to graph databases, Cypher, graph modeling, network analysis, and graph machine learning.

Also explained in

Compare how 2 books explain property graph →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Algorithms for Data Science. The section links point to the parts of the book it draws on.