A NoSQL graphics database under Windows? NEO4J installation + environment variable configuration + Service Registration + Access

Source: Internet
Author: User
Tags neo4j

A Java-dependent JVM virtual machine, so that the JDK is installed in the system

Second, the official website address download the Windows Community version of the compressed package: neo4j-x.x.x alpha05 (Windows)


Thirdly, rename the extracted file to be placed under any drive letter: D:\neo4j-community-3.4.0

Inside such as bin, conf, data, plugins folder and so on no longer do explain, installed so many software, do not look at the content also know these folders is what to do.

Iv. configuration of System environment variables

(1)

Neo4j_home = D:\neo4j-community-3.4.0

(2)

Path =%neo4j_home%\bin;

V. Verifying the installation and environment variable configuration of the neo4j is successful (1) CMD Administrator run Neo4j.bat console

Six, in the form of an HTTP connector (one of three connection methods) to access the NEO4J database http://localhost:7474 default jump to http://localhost:7474/browser Default User: neo4j default password: Neo 4j after login, reset the password

Vii. Registered neo4j Service (1) neo4j Install-service

(2) Local Service view

Eight, open neo4j service

Nine, stop, restart, query neo4j service ten, NEO4J graphics database Simple Description of the origin of the graph database name in fact, and in the underlying storage mode, neo4j the bottom of the way to the user-defined nodes and relationships stored, through this way, can be efficient implementation from a node,      Through the Relationship between node and node, find out the connection between two nodes.        Xi. neo4j Graphics Database creation Data scenario: Node 1 (male) + relationship (Love) + Node 2 (female) Open our neo4j, ready to write a script to create our first graph data! A. Creating A Node 1 Name: Fish warm (the name of the node is the variable name of the node, which we use the abbreviation of the English alphabet) Gender: Male Occupation: Programmer (the category of node, data that can be used as node attribute) hobby: The NBA uses cypher statements to create the nodes above us creation (Yu: Coder{name: ' Warm fish ', sex: ' Male ', hobby: ' NBA '}

As long as you're familiar with Josn, it's easy to create a node like this

Since neo4j is a graph database, let's take a look at how this node is presented to us in neo4j.

B. Creating a Node 2

Name: Cool and warm (the name of the node is the variable name of the node, which we use in abbreviated English letters) Gender: Female Occupation: Photographer (the category of node, data that can be used as the node attribute) hobby: Photo As above creation method

C. Querying nodes 1

Match is equivalent to a select query in a SQL database, but in NoSQL, it means matching, finding

D. Creating a relationship (Love) Connect node 1 and Node 2

Match (n:coder{name: ' Warm Fish '})
Match (m:photographer{name: ' Cool Warm '})
Merge (n)-[:love{years: ' Five years More '}]-> (m)

1. Find node 1 variable name: n

2. Find Node 2 variable name: M

3. Relationship Connection-

4. Prevent the match node from not being present, use merge when connecting: If the node does not exist, create

5. Relationship: [: Relational data]

6. Connection: (n)-[: Relationship]-> (m)

In the left column relationship type, "Love" has already appeared

Click to open the view

E. Deleting a node

(1) Smart hints to match all nodes

(2) Select a node, choose Coder

This is not erased, why, don't forget, this node is related

What do we do? When matching, add a detach (separate)

Match (N:coder) Detach
Delete N

This means that if the node to be deleted has a relationship with other nodes, then adding detach means that the next deletion will be devastating, that is, not only deleting the node, but also deleting the relationship

The last thing you see is

A NoSQL graphics database under Windows? NEO4J installation + environment variable configuration + Service Registration + Access

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.