-
Notifications
You must be signed in to change notification settings - Fork 38
importing-relational-graph - new course #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
adam-cowley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't get too into the weeds with postgres and SQL statements. The course should be more conceptual and talk about the modeling decisions on the database schema and tables, which just happen to be stored in postgres, but could also be in BigQuery, firebase, snowflake, etc.
|
|
||
| * Understand the fundamental differences between relational and graph data models. | ||
| * Analyze relational database schemas to identify entities, relationships, and properties. | ||
| * Use PostgreSQL and Postico or pgAdmin to explore and query relational data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Postgres is where the data happens to come from, we shouldn't be teaching them how to use Postico or pgAdmin.
| You will also need: | ||
|
|
||
| * A Neo4j database - choose one of: | ||
| ** **AuraDB Professional** (recommended) - No credit card required, includes Graph Data Science support and Data Importer | ||
| ** **GraphAcademy Sandbox** (quick start) - Free temporary sandbox provided with this course for learning | ||
| ** **Self-managed Neo4j** - Neo4j Desktop or Docker installation | ||
| * PostgreSQL installed (link:https://postgresapp.com/[Postgres.app^] for macOS or link:https://www.postgresql.org/download/[postgresql.org^]) | ||
| * Postico (macOS) or pgAdmin (Windows, Linux, macOS) - optional but recommended | ||
| * The Northwind database (instructions provided in the course) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is too much ambiguity here with so many tools, which will lead to confusion. Stick to AuraDB and remove the rest.
| * The fundamental differences between relational and graph data models. | ||
| * How to analyze and understand relational database schemas. | ||
| * Techniques for mapping relational tables to graph nodes and relationships. | ||
| * How to extract data from PostgreSQL databases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're teaching the concepts of Relational to Graph, not specifically Postgres to Neo4j
| style C fill:#4C8EDA,stroke:#2563EB,color:#fff | ||
| style O fill:#F59E0B,stroke:#D97706,color:#fff | ||
| style P fill:#10B981,stroke:#059669,color:#fff | ||
| style Cat fill:#8B5CF6,stroke:#7C3AED,color:#fff | ||
| style S fill:#EC4899,stroke:#DB2777,color:#fff | ||
| style E fill:#06B6D4,stroke:#0891B2,color:#fff | ||
| style Sh fill:#F97316,stroke:#EA580C,color:#fff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Welcome to "Importing Relational Data to Neo4j"! | ||
|
|
||
| In this course, you will learn how to migrate data from relational databases into Neo4j. You will explore the differences between relational and graph data models, and learn practical techniques for transforming and importing relational data into Neo4j. | ||
|
|
||
| == What you will learn | ||
|
|
||
| In this course, you will: | ||
|
|
||
| . Understand the differences between relational and graph data models | ||
| . Learn how to analyze relational database schemas and identify entities, relationships, and properties | ||
| . Discover techniques for mapping relational tables to graph nodes and relationships | ||
| . Use tools and methods to extract data from relational databases | ||
| . Import relational data into Neo4j using various approaches | ||
| . Validate and query your imported graph data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplication of course.adoc? If not, it's better placed in module.adoc.
| === Example graph model | ||
|
|
||
| The equivalent Northwind data in a graph would have: | ||
|
|
||
| * `Customer` nodes with properties: `companyName`, `contactName`, `city`, `country` | ||
| * `Order` nodes with properties: `orderDate`, `shipCity` | ||
| * `Product` nodes with properties: `productName`, `unitPrice` | ||
| * `Category` nodes with properties: `categoryName`, `description` | ||
| * `Supplier` nodes with properties: `companyName`, `contactName`, `city`, `country` | ||
| * `Employee` nodes with properties: `firstName`, `lastName`, `title` | ||
| * `PLACED` relationships from `Customer` to `Order` | ||
| * `CONTAINS` relationships from `Order` to `Product` with properties: `quantity`, `unitPrice`, `discount` | ||
| * `BELONGS_TO` relationships from `Product` to `Category` | ||
| * `SUPPLIES` relationships from `Supplier` to `Product` | ||
| * `SOLD` relationships from `Employee` to `Order` | ||
| * `REPORTS_TO` relationships from `Employee` to `Employee` (for the management hierarchy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the topic of the entire course, it seems to be glossed over here
| == Common Misconceptions | ||
|
|
||
| When learning about relational-to-graph migration, several misconceptions can lead to poor data models: | ||
|
|
||
| [IMPORTANT] | ||
| .Misconception 1: "Every table becomes a node" | ||
| ==== | ||
| **Wrong:** Automatically converting every SQL table to a graph node. | ||
|
|
||
| **Reality:** | ||
| *Entity tables (customers, products, orders) → Nodes | ||
| *Junction tables (order_details) → Relationships with properties | ||
| *Lookup tables (status codes) → Often become properties, not nodes | ||
| *Audit tables → May not belong in the graph at all | ||
| ==== | ||
|
|
||
| [IMPORTANT] | ||
| .Misconception 2: "Rows become nodes, columns become relationships" | ||
| ==== | ||
| **Wrong:** Thinking columns map to relationships. | ||
|
|
||
| **Reality:** | ||
| *Rows → Individual node instances | ||
| *Columns → Properties on nodes | ||
| *Foreign key columns → Relationships to other nodes | ||
| *Junction tables → Relationships with properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each of these is a big consideration and a lesson in its own right
| ==== Option B: GraphAcademy Sandbox (Quick Start) | ||
|
|
||
| GraphAcademy provides a free Neo4j Sandbox for learning purposes. The sandbox is a temporary Neo4j instance that you can use to practice without any setup. | ||
|
|
||
| To use the GraphAcademy Sandbox: | ||
|
|
||
| . This course includes a sandbox that is automatically provisioned when you enroll | ||
| . Look for the **Sandbox** panel in the course interface (usually on the right side of lesson pages) | ||
| . Click **Open Sandbox** to launch Neo4j Browser connected to your sandbox instance | ||
| . Your sandbox credentials are displayed in the panel - use these if you need to connect external tools | ||
|
|
||
| [NOTE] | ||
| .Sandbox limitations | ||
| ==== | ||
| The GraphAcademy Sandbox is designed for learning and has some limitations: | ||
|
|
||
| * **Temporary** - Sandboxes expire after a period of inactivity (typically 3 days) | ||
| * **Data persistence** - Data may be reset between sessions | ||
| * **No Data Importer UI** - You will use Cypher `LOAD CSV` commands instead of the visual Data Importer | ||
|
|
||
| For a persistent database with the full Data Importer experience, use AuraDB Professional (Option A). | ||
| ==== | ||
|
|
||
| To connect to your sandbox from external tools: | ||
|
|
||
| . Copy the **Bolt URL** from the Sandbox panel (format: `bolt://xxx.databases.neo4j.io:7687`) | ||
| . Use the provided **Username** (usually `neo4j`) | ||
| . Use the provided **Password** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove sandbox
| === Northwind Dataset | ||
|
|
||
| The Northwind database is a sample relational database that represents a fictional company's sales data. You will use this dataset throughout the course to practice importing relational data into Neo4j. | ||
|
|
||
| There are two ways to access the Northwind data: | ||
|
|
||
|
|
||
| ==== Option A: Ready-to-Import CSV Files (Recommended) | ||
|
|
||
| The Northwind data has already been exported to CSV files and is available in the Neo4j GitHub repository, ready to import directly into Neo4j: | ||
|
|
||
| Northwind CSV files on GitHub: `https://github.com/neo4j-graph-examples/northwind/tree/main/import` | ||
|
|
||
| This is the fastest way to get started. You can: | ||
|
|
||
| * Download the CSV files and upload them to the Neo4j Data Importer | ||
| * Use `LOAD CSV` in Cypher to import directly from the GitHub raw URLs | ||
| * Skip the PostgreSQL setup entirely if you just want to focus on the Neo4j import process | ||
|
|
||
| [TIP] | ||
| .Quick start with CSV files | ||
| ==== | ||
| If you want to skip the relational database exploration and jump straight to importing data into Neo4j, use the pre-exported CSV files. The import process is covered in Module 3. | ||
| ==== | ||
|
|
||
|
|
||
| ==== Option B: PostgreSQL Database (Optional - Full Experience) | ||
|
|
||
| If you want the complete experience of extracting data from a relational database, you can set up PostgreSQL with the Northwind data. This is optional but recommended if you want to: | ||
|
|
||
| * Explore the relational schema using SQL queries | ||
| * Practice exporting data from a relational database | ||
| * Understand the full migration workflow from source to target | ||
|
|
||
| **PostgreSQL Installation:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are too many options here. Show them how to set up a source, from there the files are treated the same way as CSV's so let's use the path of least resistance
| The Northwind database represents a fictional company that sells food products. It contains data about: | ||
|
|
||
| * **Customers** who place orders | ||
| * **Orders** containing multiple products | ||
| * **Products** organized into categories | ||
| * **Suppliers** who provide products | ||
| * **Employees** who process orders | ||
| * **Shippers** who deliver orders | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat of the opening lesson?
839f5f2 to
5e254f6
Compare
|
|
||
| CREATE DATABASE Northwind | ||
| WITH | ||
| owner = hho |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Pre-Release Checklist
Content Finalization
:status: activein course.adocTesting & Quality Assurance
Blog & Documentation
#graphacademyad.adocand/orpromo.adocand notify#team-documentationfor inclusion in DocsSuccess Metrics