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

Graph

Uploaded by

raghavi.s
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Graph

Uploaded by

raghavi.s
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

GRAPH DATABASE &

THEIR APPLICATION IN
DATA SYSTEMS
Presentation by Shivang Kumar
Register No. : 2348610
OVERVIEW
The basics, advantages, and practical uses of graph databases will all be covered in this lecture. By
the end, you'll comprehend how they may improve data management and analysis.

INTRODUCTION PROPERTY GRAPH PROS & CONS

WORKING OF GRAPH DATABASE Cypher query language CONCLUSION


INTRODUCTION
A graph database is an example of a NoSQL database that employs
graph structures for semantic queries. Graph databases are made
to store and search densely connected data, like that found in
social networks, product catalogues, and knowledge graphs.
Example of graph-structured data (boxes represent
vertices, arrows represent edges).
WORKING OF GRAPH
DATABASE
A graph consists of two kinds of objects: vertices (also known as nodes or
entities) and edges (also known as relationships or arcs). These elements
form the basis for describing diverse data kinds within a graph structure.
Information is arranged in graph databases into nodes, which stand in for
things like people, things, or places, and edges, which describe connections
between nodes, such as "friends with" or "is a part of."
Social networks: Vertices represent persons/software, while
edges show which individuals are acquainted.
Rail or road systems: Vertices are intersections, and edges are
the railroad tracks or roadways between them.
PROPERTY GRAPH
A property graph is a graph database where data is stored as nodes
and edges with properties attached to both of those. This makes
creating an extremely versatile data model possible because any data
may be represented as a node or edge, and each node or edge can be
given any number of properties.
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 kind of
relationship between the two vertices
• A collection of properties (key-value
Example of a Property Graph illustrating all the characteristics
pairs)
of the model
CYPHER QUERY LANGUAGE
Cypher is a declarative query language for
property graphs designed for the Neo4j graph
database.

Cypher is a powerful language that may be used


for a wide range of tasks, including:

• Analysing a graph's nodes and edges


• Using a graph to search for linked nodes
• Matching graph patterns
• Data aggregation in a graph
Shows the Cypher query to insert the lefthand portion into a
graph database
You can read the query as follows:
Find any vertex (let's call them people)
that satisfies both of the requirements
below.
• The vertex to which the person has
an outward BORN_IN edge. Until you
reach a location-type vertex with the
name property set to "United States".
• The LIVES_IN edge of the same vertex
is outgoing. You ultimately arrive at a
vertex of type Location with the
name property equal to "Europe"
after that edge and a series of
outgoing WITHIN edges.
Cypher query to find people who emigrated from the US to
Europe
PRO & CONS OF GRAPH DATABASES
THE DRAWBACKS OF GRAPH BENEFITS OF GRAPH
DATABASES DATABASES
• Application performance may • Graph databases are excellent at
suffer if it wants to scale maintaining and querying data
horizontally. with complex, many-to-many
• Not very effective when a certain relationships. Effective for
parameter needs to be updated Complex Relationships.
on all nodes. • Real-Time Insights: Perfect for
applications like social networks
that need to analyze
relationships in real time.
• Natural Data Representation: By
simulating real-world
relationships, graph databases
In conclusion, graph databases provide a robust method for
organising various and querying data with complex interactions.
They are an invaluable tool in multiple disciplines due to their
versatility, high performance, and adaptability for real-time
research. Although they have some drawbacks, data-driven
applications continue to employ them because of their capabilities
in handling complicated connections.

CONCLUSION
THANK YOU

You might also like