[AI Combat] Neo4j graph database in NLP

Introduction to graph database Neo4j

Neo4j is a high-performance, NOSQL graph database that stores structured data on the network rather than in tables. It is an embedded, disk-based, Java persistence engine with full transactional features, but it stores structured data on a network (called a graph from a mathematical point of view) rather than in a table.
Neo4j has attracted more and more attention due to its advantages of embeddedness, high performance, and lightweight.

operating environment

  • Ubuntu 18.04LTS
  • Docker version 18.09.4, build d14af54266

Install Neo4j

This article installs Neo4j in a docker container.

  • 1. Download the mirror
    first search the mirror:
docker search neo4j

Find the following image:

NAME                                            DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
neo4j                                           Neo4j is a highly scalable, robust native gr…   1076                [OK]            
neo4j/neo4j-experimental                        Experimental Neo4j Docker images                9                                   
bitnami/neo4j                                   Bitnami Docker Image for Neo4j                  9                                       [OK]
neo4j/neo4j-arm64-experimental                  Experimental Neo4j images for the ARM64 arch…   5                                   
neo4j/neo4j-sandbox-3.5-v2                                                                      2                                   
neo4j/neo4j-3.5-browser-4.1.2                                                                   2                                   
neo4j/neo4j-dcos                                Neo4j image to run in DCOS/Mesos                1                                   
virtualflybrain/docker-vfb-neo4j                Blank neo4j instance with no data and authen…   0                                       [OK]
virtualflybrain/pipeline                        Pipeline for internal data transfer from Kno…   0                                       [OK]
virtualflybrain/docker-ols-loader               Import data from OWL to NEO4J PROD DB           0                                       [OK]

Then pull the image:

docker pull neo4j/neo4j-sandbox-3.5-v2

Let's take 3.4 as an example:
view the neo4j image:

docker images|grep neo

get:

neo4j        3.4          46cf5a32daf7        2 years ago         349MB
  • 2. Create a neo4j container
    Edit the script start.sh:
docker run -it -d -p 7474:7474 -p 7687:7687 \
-v /home/123/neo4j_data/data:/data \
-v /home/123/neo4j_data/import:/import \
neo4j:3.4

Create the container:

sh start.sh
  • 3. View the neo4j container
docker ps|grep neo4j

get:

708f7fd      neo4j:3.4       "/sbin/tini -g -- /d…"   2 minutes ago      Up 25 minutes       0.0.0.0:7474->7474/tcp, 7473/tcp, 0.0.0.0:7687->7687/tcp

The installation of Neo4j is basically completed here.

Setting up Neo4j

  • 1. The browser enters the neo4j interface
    http://10.1.2.3:7474/browser/
    [Note] IP=10.1.2.3 is changed to your own server IP

    The interface is as follows:
    insert image description here

  • 2. Set the password.
    The default username and password of the graph database Neo4j are neo4j.
    Enter the username and password:
    insert image description here

Click connect to connect to the neo4j database.
Jump to the following page:
insert image description here
just enter a new password:
insert image description here
click change password to complete, and you will get the following page:
insert image description here

  • 3. Then you can do your own thing.

reference

1. Encyclopedia-Neo4j
2. Neo4j official website https://neo4j.com/

Guess you like

Origin blog.csdn.net/zengNLP/article/details/127303515