Introduction To Graph Databases
Introduction To Graph Databases
andd Neo4j
N 4j
WHAT IS A GRAPH DATABASE?
1
Module What is a Graph?
Overview What is a Graph Database?
Why a Graph Database?
Graph Databases vs Relational Databases
Graph Databases vs Document Databases
Examples of Graph Databases
Node
Relation
Node
2
Easily extendable and expandable
3
A graphh database
d t b i a
is
database that uses graph
structures to represent and
store data
4
Property Graph Model
Relationships are
Nodes and
Contains nodes named and
relationships
contain directed with a
and relationships
properties start and end
node
Joanna Microsoft
Name: Joanna Works_For Name: Microsoft
City: Salt Lake City Since: 2010/1/1 City: Salt Lake City
Married: true Rocks: true
5
Why a Graph Database?
Structure and
Highly related
Flexible schema queries are
data
brain friendly
Relational Graph
Tables Nodes
Schema with nullables No schema
Relations with foreign keys Relation is first class citizen
Related data fetched with joins Related data fetched with a pattern
6
Relational Databases Advantages
Highly Calculations
Grouping of data
structured data within one table
Order LineItem
OrderId CustomerId Date OrderId ProductId Quantity
1 1 2015/1/1 1 1 5
Product
ProductId Description Use
1 Candle Inside
7
Social network
Friends of friends structure
mySQL and Neo4j
Partner and 1,000,000 people
Vukotic's Each with an average of 50 friends
Experiment Depth 2: Find all friends of a user's friends
Depth 3: Find all friends of friends of a
user's friends
Etcetera
Results
8
Relational Database Normalization
A Social Graph
Cyber ITActive
9
A graph is a collection of nodes
connected by relationships
Graph
p databases g great in manyy scenarios
with related data
10