cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Modeling dilema: cloning nodes or overloading edges

Hello all.
Need some wisdom in deciding between two modeling options.
Consider the following graph representing the breakdown of a learning domain (e.g. Math):

2X_f_f0d8a7d74d5adbd7bdcd4fc784a4a551d7bb4504.png

For example, Domain:Math -> Subject:Algebra -> Topic:Linear Equations -> Chapter:Variables -> Skill:Isolating Variables

On-boarding a student calls for a Welcome Process in which their current level (Point A) and their goal (Point B) are determined as a collection of Skills. Presets help select the collection required, but it is subject to manual changes before Points A and B are determined. The Welcome Process is documented in a structure like this:


(Note: the Domain node is the same for both parts of the Graph shown here).

I'm thinking about two possible ways to model the Welcome Process:

  1. Create a new chain of nodes representing chains of "Subject->Topic->Skill" with an attribute pointing to the id of their master nodes in the learning domain (first) graph.

  2. Add (many) edges from "Preset Item" to each chain in the learning domain graph.

The first option entails cloning nodes per student.
The second option entails leaving a single node representing a true "Skill" (or "Topic" or "Subject") but over-loading maybe millions of edges (a set of edges per each student + Welcome Process).

Any thoughts you can contribute here will be appreciated.
Thanks!
Mor

2 REPLIES 2

asperlinga
Graph Buddy

Hi mor,

In principle I think I would create the second hypothesis because it is compatible with an E-R sql diagram and because it avoids duplication.

If I had to trace the history of a learner I would prefer the first solution, it looks like a personal file freed from the coherence of the domains.

Alessio

Thanks, Alessio.

Indeed I see both options are acceptable, based on the exact use case.

Mor

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online