CS 374: Database Systems
James Madison University, Spring 2022

Apr 14: Neo4j Tutorial (Graph-Based)

Lesson Outline

30 min Ch11 Slides
* Slides 64–69: Column-Oriented Databases
* Slides 70–74: Graph Based Databases (Neo4j)
* Slides 75–86: Cypher Overview / Social Graph
* Slides 87–91: Other NoSQL Categories / NewSQL
30 min Lab Activity
* See instructions below
* Start working on HW7
15 min Group Time
* Coordinate efforts
* Troubleshoot issues

Before Tuesday

  1. Textbook: Read PDBM 11.5--11.6 (10 pages).

  2. Homework: Finish / submit HW7 (due Sunday).

  3. Project: Work on GP5 (due next week).


Neo4j Tutorial

Quick Links

Step 1: Explore Neo4j Website

"A graph database is an online database management system with Create, Read, Update and Delete (CRUD) operations working on a graph data model." Spend a few minutes reading through the Why Graph Databases? page.

Open the two "Quick Links" above in separate browser tabs. For conveneince, drag them into another window, and arrange your screen to see everything (e.g., put this page on the left, and put the documentation and reference on the right).

Skim through the Getting Started and Neo4J Graph Platform sections (and all sub-sections). There are many resources linked from these introductory pages. For example, you might want to leave open the Neo4j Cypher Refcard in a new browser tab.

Step 2: Neo4j Sandbox Queries

Neo4j has a playground environment that comes with a dozen example data sets. For additional practice, create an account (or sign in using GitHub, Google, LinkedIn, Twitter) and create one or more sandboxes. Each one comes with embedded tutorial links. For example, in the Recommendations sandbox, click the "Write Code" button (under "Jump into code").

Focus most of your time today on the Cypher Query Language section. Save the more interesting queries you write, along with comments explaining them, in a file named HW7Lab.cypher for future reference. You will turn in some of these queries as part of the homework assignment.