Photo by rawpixel.com from Pexels

Chaining Neo4j graph nodes using APOC Collection function

May 1: Labour Day, One Month Graph Challenge

Vlad Batushkov
2 min readMay 1, 2019

--

Welcome word

In this series of small posts I do one simple graph daily. Domain model of graph somehow related to day’s history, some historical event, celebration or person. I do this challenge to learn Neo4j Data Modeling and Cypher. Every day. One month. Follow me. Maybe you will be inspired and next month would be yours One Month Graph Challenge. #OMGChallenge

Domain model

First of May is a good day to not work, is not it. Because it’s a Labour Day! Thank you all for eight hours for work, eight hours for recreation, and eight hours for rest. Generate a graph of working days and weekends can be good idea for beginning.

Graph

Generate a graph with nodes of working days and weekends:

Link days into one year with help of APOC function:

Resume

I think must be a better way to achieve same result or at least optimize this one. Any ideas and suggestions are welcomed in comments.

Resources

Sign up to discover human stories that deepen your understanding of the world.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Vlad Batushkov
Vlad Batushkov

Written by Vlad Batushkov

Engineering Manager @ Agoda. Neo4j Ninja. Articles brewed on modern tech, hops and indie rock’n’roll.

No responses yet

Write a response