IAU ST Lecture3
IAU ST Lecture3
Lecture 3
Mohammad Hamzei
Department of Computer Engineering
Islamic Azad University, South Tehran Branch
[email protected]
Data Models and Query Languages
Introduction
• Examples:
– Social graphs
– The web graph
• PageRank can be used on the web graph to determine the
popularity of a web page and thus its ranking in search
results.
– Road or rail networks
Graph-Like Data Models
• Data structures
– property graph model (implemented by Neo4j, Titan,
and InfiniteGraph)
– triple-store model (implemented by Datomic, …)
• Query languages
– declarative query languages for graphs:
• Cypher, SPARQL, and Datalog
– imperative graph query languages for graphs
• Gremlin
– graph processing frameworks
• Pregel
Property Graphs
• Each vertex consists of:
– A unique identifier
– A set of outgoing edges
– A set of incoming edges
– A collection of properties (key-value pairs)
• Each edge consists of:
– A unique identifier
– The vertex at which the edge starts (the tail vertex)
– The vertex at which the edge ends (the head vertex)
– A label to describe the type of relationship
– A collection of properties (key-value pairs)
Representing a property graph using a relational schema
Graph Queries in SQL