neo4j-graph-examples / northwind

From RDBMS to Graph, using a classic dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

northwind logo

Northwind Graph Example

Description: From RDBMS to Graph, using a classic retail dataset

model
Figure 1. Model
example
Figure 2. Example
Example Query:
MATCH (p:Product)-[:PART_OF]->(:Category)-[:PARENT*0..]->
(:Category {categoryName:$category})
 RETURN p.productName as product

Setup

This is for Neo4j version: 3.5,4.0

The database is also available on https://demo.neo4jlabs.com:7473

Username "northwind", password: "northwind", database: "northwind"

Rendered guide available via: :play https://guides.neo4j.com/northwind/index.html

Load graph data via the following:

Data files: import/*.csv

Import flat files (csv, json, etc) using Cypher’s LOAD CSV, APOC library, or other methods.

Dump file: data/northwind-40.dump

  • Drop the file into the Files section of a project in Neo4j Desktop. Then choose the option to Create new DBMS from dump option from the file options.

  • Use the neo4j-admin tool to load data from the command line with the command below.

bin/neo4j-admin load --from data/northwind-40.dump [--database "database"]

Data load script: scripts/northwind.cypher

bin/cypher-shell -u neo4j -p "password" -f scripts/northwind.cypher [-d "database"]

Or import in Neo4j Browser by dragging or pasting the content of scripts/northwind.cypher.

Code Examples

Feedback

Feel free to submit issues or pull requests for improvement on this repository.

About

From RDBMS to Graph, using a classic dataset


Languages

Language:Cypher 26.9%Language:Go 23.9%Language:Java 16.4%Language:C# 14.5%Language:JavaScript 10.0%Language:Python 8.2%