Graph Database
Graph Database
Miao Qiao
SEAT
Massey University
1
Graph: model the interconnectivity of objects.
Definition (Graph)
A graph G(V , E ) has a set V of vertexes (nodes) and a set E of edges.
Each edge e ∈ E connects two nodes in V .
2
Social Network
3
Road Network
4
Metabolic Network
5
Other Networks
• Internet graph.
• Communication networks.
• Distribution networks.
• etc.
Graph is a general tool for modelling the interconnectivity of the objects in
the real world.
6
Graph Size
A graph can be extremely large.
See http://law.di.unimi.it/datasets.php.
7
http://law.di.unimi.it/datasets.php
Graph Queries
• Path Query.
• Pattern Query.
• Analytical Query.
• · · ·
8
Graph Queries
• Path Query.
• Pattern Query.
• Analytical Query.
• · · ·
8
Graph Queries
• Path Query.
• Pattern Query.
• Analytical Query.
• · · ·
8
Graph Queries
• Path Query.
• Pattern Query.
• Analytical Query.
• · · ·
8
Graph Queries
• Path Query.
• Pattern Query.
• Analytical Query.
• · · ·
Many graph queries can hardly be expressed in SQL and evaluated under
RDBMS.
8
Graph data: semi-structured data
• Self-describing data.
• Document/text attached on nodes/edges.
• Queries can be more complicated.
Movie (IMDB):
9
Graph data: semi-structured data
• Self-describing data.
• Document/text attached on nodes/edges.
• Queries can be more complicated.
Web graph: webpages and their hyperlinks
9
Graph data: semi-structured data
• Self-describing data.
• Document/text attached on nodes/edges.
• Queries can be more complicated.
Who worked in both the team of “Casablanca” and “Play it again, Sam”?
9
Graph Databases
Motivation:
• Graph is a general tool for modelling the interconnectivity of the
objects in the real world.
• Real world graphs can be extremely large.
• Graph queries are computational expensive.
• Graph data: semi-structured data.
Aim: to understand and to use
• General graph database Neo4J.
• RDF graphs with their query language SPARQL.
10
Graph Databases
Motivation:
• Graph is a general tool for modelling the interconnectivity of the
objects in the real world.
• Real world graphs can be extremely large.
• Graph queries are computational expensive.
• Graph data: semi-structured data.
Aim: to understand and to use
• General graph database Neo4J.
• RDF graphs with their query language SPARQL.
10