Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Neo4j Graph Data Modelling
  • Toc
  • feedback
Neo4j Graph Data Modelling

Neo4j Graph Data Modelling

By : Mahesh K Lal
3 (1)
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
10
Index

Adding comments to Neo4j


As discussed earlier, comments can be used by users to ask more questions or clarify something to other users. Since chronology is important, we will create a chain for the comments. The assumption here is that for a new question or clarification, a new comment chain will be started with the first comment in the chain being in response to the review being commented on.

Before we add comments, we should set up a constraint on comments to ensure that we don't create comments with the same ID, as shown in the following query:

neo4j-sh (?)$ CREATE CONSTRAINT ON (comment:Comment) ASSERT comment._id IS UNIQUE;

The output of the preceding query is as follows:

+-------------------+
| No data returned. |
+-------------------+
Constraints added: 1

To add a comment to the review, we can use the following query:

CREATE (comment:Comment{_id:"df23c188-2349-11e5-8966-6c40089a9424", text:"What was wrong with the service?", created_on: 1391550607.342643}))
WITH comment
MATCH (review:Review...
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