Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What is a Graph Database?

What is a Graph Database?

In this talk I introduce what a graph data structure is, how a graph database leverages the benefits of modeling data in a graph, and some of the unique problems graph databases allow you to solve.

Kyle Misencik

August 16, 2019
Tweet

Other Decks in Programming

Transcript

  1. A graph database is an online database management system with

    Create, Read, Update and Delete (CRUD) operations working on a graph data model. Graph databases are Performant, Flexible & Agile
  2. • Graph databases are classified separately from document & relational

    databases. • Relational DBs have stood the test of time and have shown to be reliable • Document DBs are relatively new and are JSON-like storage systems, which is great for easily talking between and front-end and back-end. • Each of these have architectural pros and cons • Graph DBs are the newest and most untested, yet offer unique advantages when trying to provide certain functionality
  3. - Schema can be strict, which leads to careful consideration

    when adding, say a column, to a table. - The primary / foreign key comparisons can be “compute-heavy and memory-intensive and have an exponential cost.” - Many-to-many relationships introduce JOINS which further increase workload.
  4. - Still rather new in the grand scheme of things,

    so can still find yourself in unexplored territory - Limited support for joins (although some include joins). - Data is denormalized, requiring mass updates (i.e. product name change). - Does not have built-in data integrity (must do in code). - Limited indexing.
  5. - Graph databases should only be used when the interactions

    between your data are as important or more important than the data itself - Does your application need to perform tasks like making “recommendations”, IAM (identity and access management), or algorithmically analyze data? This is where a graph database can help tackle these challenges - This is a bit overkill for simple applications where a relational or document database would be easier to stand up and maintain
  6. Additional properties can be added via a key-value pair within

    the square brackets like so: -[{since:2010}]->
  7. Hierarchies & Tree Traversal Cypher can express depth simply with

    the appropriate relationship. A variable depth can be expressed via the * following the relationship-type. Cypher Statement:
  8. 1. Navigate to the Neo4j sandbox: https://neo4j.com/sandbox-v2/ 2. Sign in

    and select the Recommendations sandbox 3. Open the neo4j Browser This will lead you through a tutorial, importing data into the DB and using Cypher to run some introductory queries to get familiar with Cypher and end with us writing an algorithm for generating movie recommendations based on user review.