0% found this document useful (0 votes)
8 views

Graph Neo4j

Graph databases utilize a data model based on nodes and relationships, with examples including Neo4j and OrientDB. They offer advantages such as powerful querying and local indexing of connected data, but face challenges like sharding and a learning curve for users. Graph databases are particularly useful for applications in recommendations, business intelligence, social computing, and scientific computing, among others.

Uploaded by

Tharun Kshatriya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Graph Neo4j

Graph databases utilize a data model based on nodes and relationships, with examples including Neo4j and OrientDB. They offer advantages such as powerful querying and local indexing of connected data, but face challenges like sharding and a learning curve for users. Graph databases are particularly useful for applications in recommendations, business intelligence, social computing, and scientific computing, among others.

Uploaded by

Tharun Kshatriya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

NoSQL: Graph Databases

Graph Databases
• Data Model:
– Nodes and Relationships
• Examples:
– Neo4j, OrientDB, InfiniteGraph, AllegroGraph
Graph Databases: Pros and Cons
• Pros:
– Powerful data model, as general as RDBMS
– Connected data locally indexed
– Easy to query
• Cons
– Sharding ( lots of people working on this)
• Scales UP reasonably well
– Requires rewiring your brain
What are graphs good for?
• Recommendations
• Business intelligence
• Social computing
• Geospatial
• Systems management
• Web of things
• Genealogy
• Time series data
• Product catalogue
• Web analytics
• Scientific computing (especially bioinformatics)
• Indexing your slow RDBMS
• And much more!
What is a Graph?
What is a Graph?
• An abstract representation of a set of objects
where some pairs are connected by links.

Object (Vertex, Node)

Link (Edge, Arc, Relationship)


Different Kinds of Graphs
• Undirected Graph
• Directed Graph

• Pseudo Graph
• Multi Graph

• Hyper Graph
More Kinds of Graphs
• Weighted Graph

• Labeled Graph

• Property Graph
What is a Graph Database?
• A database with an explicit graph structure
• Each node knows its adjacent nodes
• As the number of nodes increases, the cost of
a local step (or hop) remains the same
• Plus an Index for lookups
Relational Databases
Graph Databases
Neo4j Tips
• Each entity table is represented by a label on
nodes
• Each row in a entity table is a node
• Columns on those tables become node
properties.
• Join tables are transformed into relationships,
columns on those tables become relationship
properties
Node in Neo4j
Relationships in Neo4j
• Relationships between nodes are a key part of
Neo4j.
Relationships in Neo4j
Twitter and relationships
Properties
• Both nodes and relationships can have
properties.
• Properties are key-value pairs where the key is
a string.
• Property values can be either a primitive or an
array of one primitive type.
For example String, int and int[] values are
valid for properties.
Properties
Paths in Neo4j
• A path is one or more nodes with connecting
relationships, typically retrieved as a query or
traversal result.
Starting and Stopping
Creating a small graph
Print the data
Remove the data
The Matrix Graph Database

You might also like