3 GRAPH DATABASE,
RELATIONAL DATABASE AND
OTHER NoSQL
(Jones, 2012) coined the term ”relational hubs” to de-
scribe the differences. According to Alistair we are
at a crossroads. One of the paths leads to the ap-
proach adopted by most NoSQL databases, in which
the data are highly denormalized and we rely on the
application to gather with typically high latency and
understanding. The other path leads to the approach
adopted by the graphs databases in which we use
the expressive power of the graph to build a flexible
model and connected to the problem in question we
then request with low latency to better understand.
Relational databases are included. As the graphs
databases, relational databases have a model centered
around the queries. But this model is not as powerful
as bases graphs. In particular, it does not create on
the fly arbitrarily large structures, semantically rich
and connected. To create any broad structure with
a relational database we need to plan our knuckles
in advance. To authorize changes, you end up cre-
ating a lot of columns that can be zero. Result: Tables
”dotted” fanciful joins (expensive), object-relational
impedance problems even with simple applications.
Furthermore, a graph database is adapted to the
use of graph-type data structures like trees or derived,
especially if it is to exploit the relationships between
data. The case of perfect use of a search is to start
with one or more nodes and browse the graph. It is al-
ways possible to make myEntity.findAll type of read-
ings (”find all the entities of a kind”), but in this case
it is necessary to use an indexing system, which can
be internal as appropriate to the graph (super-nodes
for indexing) or above the graph (via Apache Lucene
for example).
Conversely, relational databases are well suited to
findAll queries through the internal structures of ta-
bles, especially if it is to perform aggregations of op-
erations on all the rows in a table.
Despite their names, they are, however, less effec-
tive on the holding relationships, which must be op-
timized by the index creation, including foreign key.
As mentioned previously, a graph database offers the
ability to browse by physical pointers relations where
foreign keys offer only logical pointer.
4 SOME GRAPH DATABASE
APPLICATION
Social networks modeling has obviously in recent
years become one of the most visible when using the
graph databases. LinkedIn comes easily to display
the degree of separation between each contact, which
is ultimately only the distance between nodes in the
graph representing people and their relationships. Al-
though very interesting, this problem is not very com-
mon because of the small number of actors in this
market.
Use cases that should reveal most common are
(Figuiere, 2010): i) modeling a set of knowledge
about people, and a market-sector organizations or
more generally ecosystem; ii) the specific business
data representation such as cinema (films, actors, di-
rectors, and so on), publishing (books, authors, pub-
lisher, and so on) or the description of all the parts
of an industrial machine how they are interconnected;
iii) In any case, such a database will be conveniently
integrated into a heterogeneous environment Persis-
tence (thus speaks of ”polyglot persistence”) that
would address the various problems the best solution,
etc.
5 Neo4j
Neo4j is a graph database in Java designed to be em-
bedded in an application or accessed in client/server
via a REST API. The graph manipulation in Java
Neo4j is very natural with its API: Node and Rela-
tionship are the major classes used to model a graph
while adding a set of properties for each node and re-
lationship.
Imagine a social networking application such as
Facebook, Linkedin and Viadeo in which the user can
bind with friends. This user wants to know what
friends he has in common with other friends. With
a graph, he could easily see the relationship. Here is
a basic example (Figure 1):
Figure 1: example of social network relationship.
The implementation of the below scheme in a re-
lational database is not easy. There are several ways
to do so, as the pattern Querie to make resolutions,
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
400