Graph Database Neo4j
Less than 1 minute
Graph Database Neo4j
1. Introduction to Neo4j
Neo4j is a high-performance NoSQL graph database focused on storing and querying complex relational data.
Graph databases are a type of NoSQL database based on graph theory, with data storage structures and query methods grounded in graph theory.
Features
- Data Model: Uses a graph structure of nodes, relationships, and properties to intuitively represent complex connections between entities.
- Query Language: Supports the Cypher declarative query language, simplifying graph traversal operations.
- Performance Advantage: Achieves efficient relational queries through index-free adjacency and other designs, especially in deep traversal scenarios (such as K-Hop queries), with response speeds potentially thousands of times faster than traditional databases.
- Transaction Support: Fully compatible with ACID transactions, ensuring data consistency.
2. Installation on Mac
brew install neo4j
3. Start
neo4j start
4. Restart
neo4j restart
5. Stop
neo4j stop
6. Access Web Interface
http://localhost:7474/
The default username and password are both neo4j.
You can set a new password yourself.
7. Install APOC Plugin
- Check the version, e.g., version 2025.01.0
neo4j --version
- Download the corresponding version of the jar file from GitHub
https://github.com/neo4j/apoc/releases
- Move the jar file to the plugins directory of neo4j
Directories in use:
home: /opt/homebrew/Cellar/neo4j/2025.01.0/libexec
config: /opt/homebrew/Cellar/neo4j/2025.01.0/libexec/conf
logs: /opt/homebrew/var/log/neo4j
plugins: /opt/homebrew/Cellar/neo4j/2025.01.0/libexec/plugins
import: /opt/homebrew/Cellar/neo4j/2025.01.0/libexec/import
data: /opt/homebrew/var/neo4j/data
certificates: /opt/homebrew/Cellar/neo4j/2025.01.0/libexec/certificates
licenses: /opt/homebrew/Cellar/neo4j/2025.01.0/libexec/licenses
run: /opt/homebrew/Cellar/neo4j/2025.01.0/libexec/run
- Modify the neo4j.conf configuration file in the conf path
Add the following content
dbms.security.procedures.unrestricted=apoc.*
dbms.security.procedures.allowlist=apoc.*
- Verify after restarting neo4j
RETURN apoc.version()