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.

Neo4j Graph For Student and Marks

I need to model Student and their Marks obtained in specific test.  The marks are obtained in 3 different subjects and based on their total marks student get Rank.

Will the graph model with following structure is correct ?
Node  

  • Student
  • Mark
  • Rank

Relations

  • HAS_MARK                with properties [TestName, Subject ]
  • RECEIVED_RANK      with properties [TestName]

With this model , one query by keeping filter on TestName and/or Subject

- get marks for test and/or subject for individual or all students
- get average marks in test and/or subject for all students etc

1 REPLY 1

jalakoo
Node Clone

There are couple of ways you could do this, I would create these 3 nodes instead:
- student
- test
- subject

Then I would add a TOOK relationship between students and tests, with properties for when they took the test and the mark received (I would actually create 2 relationships, one for when the student took the test, and another for the mark received, but you get the idea). Simple example arrows.app file here:
Screen Shot 2023-01-05 at 9.06.11 AM.png

The rank could be calculated at query time or after every test is taken to set a rank property on the student node. Comments to this other thread discuss ways of implementing scoring that might be insightful.