Graph cafe-lightning
Graph cafe-lightning
Graph cafe-lightning
The problem with
perspective is
that it’s
bidirectional

http://xkcd.com/230/
representing dates/times	

(using neo4j 1.9.5)
representing dates/times
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24

Year: 2013

:day_25

:day_26

Day: 25

Year: 2014
:month_06

Day: 26
Month: 06

:happens
Event 1

:happens
Event 2

:happens

:happens
Event 3

:month_01
Month 01
find all events on a specific day

START
MATCH

root=node(0)	
root-[:year_2013]-()-[:month_05]-()-[:day_24]-()-

[:happens]-event 	
RETURN event
representing dates/times
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24

Year: 2013

:day_25

:day_26

Day: 25

Year: 2014
:month_06

Day: 26
Month: 06

:happens
Event 1

:happens
Event 2

:happens

:happens
Event 3

:month_01
Month 01
find all events for a given range
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24
:happens
Event 1

:next
:happens
Event 2

Year: 2013

:day_25
Day: 25

:day_26
:next

:happens

:month_06

Day: 26
Month: 06
:happens

Event 3

Year: 2014
:month_01
Month 01
find all events for a given range

START root=node(0)	
MATCH root-[:year_2013]-()-[:month_05]-()-[:day_24]-start,

root-[:year_2013]-()-[:month_05]-()-[:day_26]-end,

start-[:next*0..]-middle-[:next*0..]-end,

middle-[:happens]-event

RETURN event
find all events for a given range
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24
:happens
Event 1

:next
:happens
Event 2

Year: 2013

:day_25
Day: 25

:day_26
:next

:happens

:month_06

Day: 26
Month: 06
:happens

Event 3

Year: 2014
:month_01
Month 01
find all events for a given range
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24
:happens
Event 1

:next
:happens
Event 2

Year: 2013

:day_25
Day: 25

:day_26
:next

:happens

:month_06

Day: 26
Month: 06
:happens

Event 3

Year: 2014
:month_01
Month 01
find all events for a given range
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24
:happens
Event 1

:next
:happens
Event 2

Year: 2013

:day_25
Day: 25

:day_26
:next

:happens

:month_06

Day: 26
Month: 06
:happens

Event 3

Year: 2014
:month_01
Month 01
find all events for a given range
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24
:happens
Event 1

:next
:happens
Event 2

Year: 2013

:day_25
Day: 25

:day_26
:next

:happens

:month_06

Day: 26
Month: 06
:happens

Event 3

Year: 2014
:month_01
Month 01
find all events for a given range

START root=node(0)	
MATCH root-[:year_2013]-()-[:month_05]-()-[:day_24]-start,

root-[:year_2013]-()-[:month_05]-()-[:day_26]-end,

start-[:next*0..]-middle-[:next*0..]-end,

middle-[:happens]-event

RETURN event
does an event happen on a certain date?

START event=node(20)	
MATCH event-[:day_24]-()-[:month_05]-()-[:year_2013]-()

RETURN event
does an event happen on a certain date?
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24

Year: 2013

:day_25

:day_26

Day: 25

Year: 2014
:month_06

Day: 26
Month: 06

:happens
Event 1 (20)

:happens
Event 2

:happens

:happens
Event 3

:month_01
Month 01
property vs. relationship type

constructing cypher queries	

execution plan cache vs.
property load	

creating and deleting calendar
graph
mixed property/relationship type

START
MATCH

root=node(0)	
root-[:year_2013]-()-[:month_05]-()-[:day_24]-()-

[:hour] - (hour_node) - [:happens]-event 	
WHERE 	
hour_node.hour = {hour}	
RETURN event
calendar creation
START ref_node = node(0)	
CREATE UNIQUE ref_node -	
[:year_2013] ->
[:month_11] ->
[:day_27]
->
	 	 	 	 	 	 	 	 	 [:hour]
->
RETURN hour_node

(year_node
(month_node
(day_node
(hour_node

{year:
{month:
{day:
{hour:

{year}})
{month}})
{day}})
{hour}})

-	
-
deleting calendar
root (0)
:year_2014

:year_2013
:month_05
Month: 05
:day_24
Day: 24

Year: 2013

:day_25

:day_26

Day: 25

Year: 2014
:month_06

Day: 26
Month: 06

:happens
Event 1

:happens
Event 2

:happens

:happens
Event 3

:month_01
Month 01
QUESTIONS?

Volker Pacher
!

volker@shutl.com
www.shutl.com

More Related Content

PDF
PHP built-in function mktime example
PDF
Cassandra at Instagram 2016 (Dikang Gu, Facebook) | Cassandra Summit 2016
PDF
Cassandra at eBay - Cassandra Summit 2012
PDF
QCon 2014 - How Shutl delivers even faster with Neo4j
PDF
Cloud east shutl_talk
PDF
Shutl mongob usergroup talk jan 2013
KEY
Shutl nosql exchange talk
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
PHP built-in function mktime example
Cassandra at Instagram 2016 (Dikang Gu, Facebook) | Cassandra Summit 2016
Cassandra at eBay - Cassandra Summit 2012
QCon 2014 - How Shutl delivers even faster with Neo4j
Cloud east shutl_talk
Shutl mongob usergroup talk jan 2013
Shutl nosql exchange talk
2024 Trend Updates: What Really Works In SEO & Content Marketing

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPT
Geologic Time for studying geology for geologist
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Architecture types and enterprise applications.pdf
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
STKI Israel Market Study 2025 version august
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
August Patch Tuesday
PPTX
Tartificialntelligence_presentation.pptx
DOCX
search engine optimization ppt fir known well about this
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
WOOl fibre morphology and structure.pdf for textiles
NewMind AI Weekly Chronicles – August ’25 Week III
A review of recent deep learning applications in wood surface defect identifi...
Zenith AI: Advanced Artificial Intelligence
Final SEM Unit 1 for mit wpu at pune .pptx
Geologic Time for studying geology for geologist
A novel scalable deep ensemble learning framework for big data classification...
A comparative study of natural language inference in Swahili using monolingua...
CloudStack 4.21: First Look Webinar slides
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Web Crawler for Trend Tracking Gen Z Insights.pptx
Architecture types and enterprise applications.pdf
Getting started with AI Agents and Multi-Agent Systems
STKI Israel Market Study 2025 version august
observCloud-Native Containerability and monitoring.pptx
August Patch Tuesday
Tartificialntelligence_presentation.pptx
search engine optimization ppt fir known well about this
A contest of sentiment analysis: k-nearest neighbor versus neural network
WOOl fibre morphology and structure.pdf for textiles
Ad
Ad

Graph cafe-lightning

  • 4. The problem with perspective is that it’s bidirectional http://xkcd.com/230/
  • 6. representing dates/times root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 Year: 2013 :day_25 :day_26 Day: 25 Year: 2014 :month_06 Day: 26 Month: 06 :happens Event 1 :happens Event 2 :happens :happens Event 3 :month_01 Month 01
  • 7. find all events on a specific day START MATCH root=node(0) root-[:year_2013]-()-[:month_05]-()-[:day_24]-()-
 [:happens]-event RETURN event
  • 8. representing dates/times root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 Year: 2013 :day_25 :day_26 Day: 25 Year: 2014 :month_06 Day: 26 Month: 06 :happens Event 1 :happens Event 2 :happens :happens Event 3 :month_01 Month 01
  • 9. find all events for a given range root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 :happens Event 1 :next :happens Event 2 Year: 2013 :day_25 Day: 25 :day_26 :next :happens :month_06 Day: 26 Month: 06 :happens Event 3 Year: 2014 :month_01 Month 01
  • 10. find all events for a given range START root=node(0) MATCH root-[:year_2013]-()-[:month_05]-()-[:day_24]-start,
 root-[:year_2013]-()-[:month_05]-()-[:day_26]-end,
 start-[:next*0..]-middle-[:next*0..]-end,
 middle-[:happens]-event
 RETURN event
  • 11. find all events for a given range root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 :happens Event 1 :next :happens Event 2 Year: 2013 :day_25 Day: 25 :day_26 :next :happens :month_06 Day: 26 Month: 06 :happens Event 3 Year: 2014 :month_01 Month 01
  • 12. find all events for a given range root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 :happens Event 1 :next :happens Event 2 Year: 2013 :day_25 Day: 25 :day_26 :next :happens :month_06 Day: 26 Month: 06 :happens Event 3 Year: 2014 :month_01 Month 01
  • 13. find all events for a given range root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 :happens Event 1 :next :happens Event 2 Year: 2013 :day_25 Day: 25 :day_26 :next :happens :month_06 Day: 26 Month: 06 :happens Event 3 Year: 2014 :month_01 Month 01
  • 14. find all events for a given range root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 :happens Event 1 :next :happens Event 2 Year: 2013 :day_25 Day: 25 :day_26 :next :happens :month_06 Day: 26 Month: 06 :happens Event 3 Year: 2014 :month_01 Month 01
  • 15. find all events for a given range START root=node(0) MATCH root-[:year_2013]-()-[:month_05]-()-[:day_24]-start,
 root-[:year_2013]-()-[:month_05]-()-[:day_26]-end,
 start-[:next*0..]-middle-[:next*0..]-end,
 middle-[:happens]-event
 RETURN event
  • 16. does an event happen on a certain date? START event=node(20) MATCH event-[:day_24]-()-[:month_05]-()-[:year_2013]-()
 RETURN event
  • 17. does an event happen on a certain date? root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 Year: 2013 :day_25 :day_26 Day: 25 Year: 2014 :month_06 Day: 26 Month: 06 :happens Event 1 (20) :happens Event 2 :happens :happens Event 3 :month_01 Month 01
  • 18. property vs. relationship type constructing cypher queries execution plan cache vs. property load creating and deleting calendar graph
  • 19. mixed property/relationship type START MATCH root=node(0) root-[:year_2013]-()-[:month_05]-()-[:day_24]-()-
 [:hour] - (hour_node) - [:happens]-event WHERE hour_node.hour = {hour} RETURN event
  • 20. calendar creation START ref_node = node(0) CREATE UNIQUE ref_node - [:year_2013] -> [:month_11] -> [:day_27] -> [:hour] -> RETURN hour_node (year_node (month_node (day_node (hour_node {year: {month: {day: {hour: {year}}) {month}}) {day}}) {hour}}) - -
  • 21. deleting calendar root (0) :year_2014 :year_2013 :month_05 Month: 05 :day_24 Day: 24 Year: 2013 :day_25 :day_26 Day: 25 Year: 2014 :month_06 Day: 26 Month: 06 :happens Event 1 :happens Event 2 :happens :happens Event 3 :month_01 Month 01

Editor's Notes

  • #5: Its not all negative though... I believe delivery is the greatest potential weapon multichannel retailers have against the elephant in the room The reason Amazon is such a threat is that they have made consumers believe that there are only two reasons to buy online... range and price... conveniently they have a structural advantage in both these areas...
  • #8: Increase order value Improve conversion Happier customers