1. Relational databases dominated data storage from the 1980s by storing data in tables but struggle with today's exponentially growing and interconnected data.
2. A graph database represents an alternative that allows storing highly connected data through nodes, edges, and properties, avoiding the need to create additional tables to represent relationships.
3. In a graph database, relationships are implicitly part of the data model so there is no need to create junction tables to represent connections like in a relational database.
2. 1
A reliable home
for the business data
of thousands of organizations,
relational databases dominated
the world of data storage
and retrieval since
the 1980s.
3. 2
Storing data in neat tables of predefined relations of rows and columns was (and
still is for certain implementations) the best fit for managing strictly structured
information, such as financial records, logistical information, bank data etc.
4. Considered secure, stable and mature for a variety of business cases, however,
the relational model is quite expensive and resource-consuming when it comes
to meeting the challenges of today’s exponentially growing in volume and
interconnectedness data.
3
5. Rows and tables do have hard time expressing the richness of these
relationships together with mapping their meaning.
4
6. Designed for data that fits
a predetermined schema,relational databases
aren’t flexible enough for handling complex data modeling.
At the very least, not efficiently and at an acceptable cost.
5
7. The huge amount of
heterogeneous, diverse data
that surround us is not to
be shoehorned into tables
and tamed with the available
tools for interconnecting
that relational databases
provide.
6
9. One of the alternatives
outside the table
is the graph database
8
10. 9
A graph database is “a database that uses graph structures for semantic
queries with nodes, edges and properties to represent and store data.”
This model allows for storing highly connected data and for complex
querying of these data.
11. Representing Relationships in a Relational Database
If you want to represent, store and query the
relationships within a relational
database you will need to create a table which
describes these relationships
together with another table which describes any new
relationship
(called JOINs)
10
12. 11
For example, if you want to express that Fred, Wilma and Pebbles
Flintstone, together with the notorious Bamm-Bamm Rubble are
instances of the entity Person and live in the instance of City Bedrock,
you can do that with the following table, where you will describe
these relations:
13. For instance, in order to express that Pebbles Flintstone became
Bamm-Bamm’s wife, another table has to be created. This will be a
junction table, representing Bab-Bamm (Person.014) as an instance
of the entity Husband and Pebbles (Person.013) as an instance of the
entity Wife:
12
As things change with time, and the number and the variety of relationships grow,
you will need additional tables. For the newly occurred relations to be expressed,
you will create more and more tables.
14. Needless to say, interconnected data (the most obvious example being the data
from social networks) are everything but easy to tame with the above
mechanism of creating more and more junction tables and additional elements
to record the ever-increasing number of relationships between data items.
13
15. Joining tables vs. traversing paths
Within a graph database you won’t have to create additional
relationships as they are implicitly part of the model.
14
16. In a graph database, instead of creating tables for each relationship separately,
you will just add edges (relationships) to corresponding nodes (things) and thus
A node’s connection will in turn become a connection to the other nodes,
connected to the one you’ve added the connection to.
15
17. M a k i n g s e n s e o f t e x t a n d d a t a
To get back to our Flintstone’s example, all the tables that you’ve created for
each and every relationship separately, describing the relations among Fred,
Wilma, Pebbles and Bamm-Bamm, a graph database would express the
following way:
16
18. M a k i n g s e n s e o f t e x t a n d d a t a
Thus the system will implicitly
hold the information, without
you having to keep a record of
multiple joins and tables
to retrieve it.
17
19. M a k i n g s e n s e o f t e x t a n d d a t a
In a sense, with
graph databases
data are allowed
to organically grow
and easily connect
with more and
more items.
18
20. M a k i n g s e n s e o f t e x t a n d d a t a
It’s only natural to
consider a graph
database for complex
data, with many
connections, the
pattern of which you
want to track and
know about.
19
21. M a k i n g s e n s e o f t e x t a n d d a t a
20
Still, the decision to build a home for all
your data, neatly classified and labelled,
related, interconnected and easily
searchable, is a matter of cost and
benefit analysis.
22. 21
For the ultimate question is not:
Should I use a relational or graph database?
23. M a k i n g s e n s e o f t e x t a n d d a t a
It rather is:
What is the best home for my data and am I ready to do more with these data?
As a database can be a lot more than just a storage cupboard for siloed archives.
A database can be a springboard for discovery and exploration.
22
Explore Class Dependencies
24. www.ontotext.com
You can also reach us via email at
info@ontotext.com
and directly by calling
1-866-972-6686 (North America),
or +359 2 974 61 60 (Europe)
If you are intrigued by the alternatives outside the table
and want to see a graph database in action,
do check GraphDB™ Free
to learn more.