This section gives an introduction to managing multiple active databases with Neo4j.
This section describes the following:
With Neo4j 4.1 you can create and use more than one active database at the same time.
A database is an administrative partition of a DBMS. In practical terms, it is a physical structure of files organized within a directory or folder, that has the same name of the database. In logical terms, a database is a container for one or more graphs.
A database defines a transaction domain and an execution context. This means that a transaction cannot span across multiple databases. Similarly, a procedure is called within a database, although its logic may access data that is stored in other databases.
A default installation of Neo4j 4.1 contains two databases:
This is a data model within a database. In Neo4j 4.0 there is only one graph within each database, and many administrative commands that refer to a specific graph do so using the database name.
In Neo4j Fabric, it is possible to refer to multiple graphs within the same transaction and Cypher query.
The following image illustrates a default installation, including the
system database and a single database named
neo4j for user data:
The edition of Neo4j determines the number of possible databases:
All installations include the
All installations include a built-in database named
system, which contains meta-data and security configuration.
system database behaves differently than all other databases.
In particular, when connected to this database you can only perform a specific set of administrative functions, as described
in detail in Cypher Manual → Administration.
Most of the available administrative commands are restricted to users with specific administrative privileges. An example of configuring security privileges is described in Section 11.3, “Fine-grained access control”. Security administration is described in detail in Cypher Manual → Security of administration .
The following image illustrates an installation of Neo4j with multiple active databases, named
Each Neo4j instance has a default database. If a user connects to Neo4j without specifying a database, it will connect to the default database.
The default database is configurable. See configuration parameters for details.
The following image illustrates an installation of Neo4j containing the three databases for user data, named
hr, and the
The default database is