Graph Vs Relational Databases

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Neo4j

Graph .vs Relational Databases


What Is a Relational Database?

• Power horse of software applications since the 80s

• Store highly structured data in tables, rows and columns

• Require developers to strictly define their data

• Relationships are made by referring to primary keys and


foreign keys
Examples Of Relational Databases

• MySQL

• PostgreSQL

• Oracle

• Microsoft SQL Server

• SQLite

• MariaDB
JOIN Statements

• When using MANY-to-MANY statements, a JOIN table must be used

• Holds foreign keys of both tables

• These operations weigh heavily on memory and other resources

• Data can be denormalised to reduce joins


When To Use Relational Databases

• Large but “simple” data structures

• Not many relationships / connections

• Relationships do not need to be stored

• Data not expected to greatly scale


When To Use Graph Databases

• Need to Scale

• Data that is highly interconnected (Friends of Friends)

• Data that can easily be visualized

• High performance data


SQL vs. Cypher
Relational Database -> Graph
Importing Data From A Relational DB

Easiest way is to create a CSV dump of individual entity-tables and


And join tables

Then take the CSV file and use Cypher’s LOAD CSV tool

This will ingest the data, accessing columns by header name or


offset and match existing nodes based on attribute lookups

You might also like