Skip to content
/ neo4j Public

Neo4j Tutorial, installation, use Command, etc.

Notifications You must be signed in to change notification settings

irezaul/neo4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 

Repository files navigation

neo4j

Neo4j Tutorial -

How to Install Docker on your macOS Machine -

  • 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.

Run Docker app & wait for a while to ready docker app -

when ready docker app open terminal & run docker command -

docker run -d -p 80:80 docker/getting-started

docker run command

Now Start Neo4j pulling

run this command on terminal -

docker pull neo4j --platform linux/amd64

neo4j pull command

check on docker app images tab -

dockerapp_images

docker_image

Now run neo4j image porcess by terminal with define port & login ID PASSWORD

docker run --platform linux/amd64 -p7474:7474 -p7687:7687 -d --env NEO4J_AUTH=neo4j/test neo4j:latest

neo4j image run

now your neo4j ready for run on your define port number.

localhost:7474

neo4j run by port

Congratulation!

Now put your ID & Password what we define - -

ID - neo4j
Pass- test

Login done

neo4j_login

Command Play come -

command_play_ready

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.

Command --

  • MATCH command

MATCH command which like a query to find me anything matches the quiteria thay i have.

MATCH (n) RETURN (n)

MATCH (n) means n is node & RETURN (n) - return node

MATCH_n

no record found & no node found.

Now we create a node by Command-

CREATE (n)

create a node

again type the match command to see node

MATCH (n) RETURN (n)

see here created a node by showing graphiclly

node create

you can see, we did not create a relationship here and did not name the node.

How to delete?

delete command is -

MATCH (n) DELETE (n)

node delete

How to added a Person with color on node -

CREATE (n:Person{name:'Master-Academy', favoritecolor:'green'})

create person

* If we need a delete a person -

MATCH (n:Person {name: 'UNKNOWN'})
DELETE n

* How to find a single person by command -

MATCH (n:Person) RETURN (n)

single person call

* How to Create a Relationship between in 2 Nodes --

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 on r:RELATIONSHIP

How to delete a 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 -

I Create a relationship here see on image -

relationship_done

How to delete all nodes & relationship -

MATCH (n) DETACH DELETE (n)

About

Neo4j Tutorial, installation, use Command, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published