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

8 - Graph Databases

Uploaded by

Leticia Campi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

8 - Graph Databases

Uploaded by

Leticia Campi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Graph databases

Hello, we know the main characteristics, advantages, and disadvantages of NoSQL


systems.
We have revised document and key-value databases so far.
Now, it's time to have a look at graph databases.
We need to recognize that graph on the first place in order to understand how a graph
database stores data.
Let's start. A graph is represented as a set of nodes, which can be entities
interconnected by edge or relationships.
Graphs give importance not only to data, but also to the relationships between nodes.
Relationships can also have attributes and direct queries can be made to relationships
rather than to the nodes.
Being stored in this way, it is more efficient to navigate between relationships than in a
relational model.
Obviously, graph databases are only useful when the information can be easily
represented as a network.
Among the most used graph database implementations are Neo4j, HyperBase-DB, and
InfoGrid.
The performance and scalability of a graph-oriented database are variable and highly
complex to implement.
However, a graph databases is highly flexible in terms of a structure.
An example of this database manager is Neo4j.
This type of database store graphs, and as we have said before, a graph is one of the
most generic and flexible data structure.
A graph stores data in nodes, which have properties.
Nodes are organized in relationships, which also have properties.
A label groups nodes into relationships and/or option.
A journey navigates a graph, which identifies paths that order nodes.
Indexes map properties to nodes or relationships.
A graph database manages a graph and its indexes.
Neo4j uses graphs to represent data and the relationships between them.
A graph is formed by vertices or denoted by circles, and edges shown by intersecting
lines.
We have several types of graphs.
Not directed graphs, where nodes and relationships are interchangeable, and the
relationship can be interpreted in any sense.
For instance, friendship, relationships in the social network, Facebook.
Directed graphs, where nodes and relationships are not bidirectional by default.
For instance, relationships on Twitter where a user can follow certain profiles without
them following him.
Weighted graphs, where relationships between nodes have sometime of numerical
evaluation.
Labeled graphs are used when different vertices and relationships between them are
defined and identified by labels.
An example of labeled graphs is on Facebook where we could have nodes we find by
terms like friend or co-worker and the relations like friend of or partner of.
The last kind of graphs are property graphs, it is a graph with weight,
with labels and where we can assign properties to both nodes and relationships.
For example, name, age, country of residence, birth.
It is a most complex because it contains several of the characteristics we have to cover
before like labels, weight, directions etc.
The following graph represents the main concepts we have revised so far.
A graph-oriented database is especially powerful when we want to mobile connected
data.
It uses a model based on the graph composed by nodes and relationships with
properties.
Any domain can be represented as graph, and therefore, managed by Neo4j.
Neo4j Is a graph database that allows
high-performance and high-availability during read operations.
Neo4j is a solid database that gives real support for ACID transactions, which is very
important feature that NoSQL databases can offer.
This server is usable as a Java library or it has a REST API.
A REST API is a web service that means Representational State Transfer and it use HTTP
as a medium to communicate with the data source and return resource in the form of
JSON.
Now that we have reviewed some basic graph concepts, we will check how to
implement a graph database during next session.
See you soon, bye.

You might also like