Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Neo4j Graph Data Modelling
  • Table Of Contents Toc
  • Feedback & Rating feedback
Neo4j Graph Data Modelling

Neo4j Graph Data Modelling

By : Mahesh K Lal
3 (1)
close
close
Neo4j Graph Data Modelling

Neo4j Graph Data Modelling

3 (1)
By: Mahesh K Lal

Overview of this book

If you are a developer who wants to understand the fundamentals of modeling data in Neo4j and how it can be used to model full-fledged applications, then this book is for you. Some understanding of domain modeling may be advantageous but is not essential.
Table of Contents (11 chapters)
close
close
10
Index

Analysis of the historical data


We have explored how to use the data model to enable a traveler to find what they need. With this data and some clever querying, we can also discover some trends that can help the businesses. Given we have the year, month, and day of bookings and hotel stays, we can venture into analyzing data and behavior patterns of individuals, and how it affects the businesses (hotels and airlines).

Querying to discover patterns

Bookings are not spread across the year evenly. There will always be months when the number of bookings made far exceeds the number of bookings during other months. The following query gives the number of bookings made for each month:

neo4j-sh (?)$ MATCH (booking:Booking)
WITH COLLECT(booking) AS bookings, booking
RETURN DISTINCT booking.month AS month, COUNT(bookings) AS num_of_bookings 
ORDER BY num_of_bookings DESC;

The output of the preceding query is as follows:

+-------------------------+
| month | num_of_bookings |
+-------------------------...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY