You get a bonus - 1 coin for daily activity. Now you have 1 coin

Neo4j basics: creating, inserting, adding keys, deleting, and editing

Practice




NEO4J creating, inserting, adding a key, deleting, editing

NEO4J basics of working with a graph-oriented NO SQL database
delete all connected nodes
match (n)-[r]-() DELETE n,r

delete all unconnected nodes (only if any remain)
match n DELETE n


create a node with the User label and property id:1 and 2

create (n:User {id:1})
create (n:User {id:2})

join with a follow edge (connect the nodes with property =1 and =2)
MATCH (a {id : 1}), (b {id : 2}) MERGE (a)-[r:follow]->(b) ;



create a CONSTRAINT and indexes
CREATE CONSTRAINT ON(u : User)ASSERT u . id IS UNIQUE ;



find all users (all nodes)
MATCH (n:`User`) RETURN n LIMIT 25

(maximum 25 nodes)

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Databases - MySql (Maria DB)"

Terms: Databases - MySql (Maria DB)