Neo4j Tutorial -
- Installation -
- Docker_download -
- Double-click the DMG file, and drag-and-drop Docker into your Applications folder.
- You need to authorize the installation with your system password.
- Double-click Docker.app to start Docker -
- The whale in your status bar indicates Docker is running and accessible.
- Docker presents some information on completing common tasks and links to the documentation.
- You can access settings and other options from the whale in the status bar. a. Select About Docker to make sure you have the latest version.
when ready docker app open terminal & run docker command -
docker run -d -p 80:80 docker/getting-started
run this command on terminal -
docker pull neo4j --platform linux/amd64
check on docker app images tab -
docker run --platform linux/amd64 -p7474:7474 -p7687:7687 -d --env NEO4J_AUTH=neo4j/test neo4j:latest
localhost:7474
ID - neo4j
Pass- test
Command Play come -
Okey LET'S started - Neo4j
is a Graph
Database, which language usage is called Cypher
(Cypher Query Language).
Cypher’s syntax provides a visual and logical way to match patterns of nodes and relationships in the graph. It is a declarative, SQL-inspired language for describing visual patterns in graphs using ASCII-Art syntax. It allows us to state what we want to select, insert, update, or delete from our graph data without a description of exactly how to do it. Through Cypher, users can construct expressive and efficient queries to handle needed create, read, update, and delete functionality.
- MATCH command
MATCH
command which like a query to find me anything matches the quiteria thay i have.
MATCH (n) RETURN (n)
no record found & no node found.
CREATE (n)
again type the match command to see node
MATCH (n) RETURN (n)
see here created a node by showing graphiclly
you can see, we did not create a relationship here and did not name the node.
delete command is -
MATCH (n) DELETE (n)
CREATE (n:Person{name:'Master-Academy', favoritecolor:'green'})
MATCH (n:Person {name: 'UNKNOWN'})
DELETE n
MATCH (n:Person) RETURN (n)
MATCH
(a:Person),
(b:Person)
WHERE a.name = 'Mostain' AND b.name = 'Master-Academy'
CREATE (a)-[r:FOUNDER_OF]->(b)
put the name of nodes on
='Name'
also type the relationship name onr:RELATIONSHIP
MATCH (n {name: 'NODE_NAME'})-[r:RELATIONSHIP_NAME]->()
DELETE r
where
NODE_NAME
you set here your node name or person name &r:RELATIONSHIP_NAME
here you type your relation name -
MATCH (n) DETACH DELETE (n)