Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Neo4j Graph Data Modelling

You're reading from   Neo4j Graph Data Modelling Design efficient and flexible databases by optimizing the power of Neo4j

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781784393441
Length 138 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Mahesh K Lal Mahesh K Lal
Author Profile Icon Mahesh K Lal
Mahesh K Lal
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Graphs Are Everywhere FREE CHAPTER 2. Modeling Flights and Cities 3. Formulating an Itinerary 4. Modeling Bookings and Users 5. Refactoring the Data Model 6. Modeling Communication Chains 7. Modeling Access Control 8. Recommendations and Analysis of Historical Data 9. Wrapping Up Index

A model for reviews and comments


The following figure gives an example of the information that reviews and comments will contain:

Figure 6.1: Reviews and comments

Every review has to be uniquely identified for which we use the _id property. Value for money, comfort, food, and service are all the parameters that have been discussed earlier. The rating has been given on a scale of 1 to 5, assuming 1 to be lowest and 5 to be the highest. In addition to these, we have created_on, which is the timestamp of the creation of the review. Similarly, stayed_on is a timestamp of the day that the reviewer stayed at the hotel. We also capture additional information such as stay_year, stay_month, and stay_day. This will help us with range queries on the time of the year that the review was written.

Comments have _id, which uniquely identifies a comment. The created_on property is the timestamp of when the comment was created. The text is the actual communication that the traveler wants to send across to the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime