With Neo4j 5 you can create and use more than one active database at the same time.
Neo4j is a Database Management System, or DBMS, capable of managing multiple databases. The DBMS can manage a standalone server, or a group of servers in a cluster.
A Neo4j instance is a Java process that is running the Neo4j server code.
- Transaction domain
A transaction domain is a collection of graphs that can be updated within the context of a single transaction.
- Execution context
An execution context is a runtime environment for the execution of a request. In practical terms, a request may be a query, a transaction, or an internal function or procedure.
A data model within a database.
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 Neo4j 5 each standard database contains a single graph. Many administrative commands refer to a specific graph by using the database name.
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 5 contains two databases:
system- the system database, containing metadata on the DBMS and security configuration.
neo4j- the default database, a single database for user data. This has a default name of
neo4j. A different name can be configured before starting Neo4j for the first time.
Be aware that the automatically created initial default database may have a different topology to the default configuration values. See Default database in a cluster for more information.
- Composite database
A Composite database is a logical grouping of multiple graphs contained in other, standard databases.
A Composite database defines an execution context and a (limited) transaction domain.
For more information, see Composite databases.
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 → Database management.
Most of the available administrative commands are restricted to users with specific administrative privileges. An example of configuring security privileges is described in Fine-grained access control. Security administration is described in detail in Cypher Manual → Access Control .
The following image illustrates an installation of Neo4j with multiple active databases, named
The default and home database
If a user connects to Neo4j without specifying a database, they will be connected to a home database. When choosing a home database the server will first use the home database configured for that user. If the connecting user does not have a home database configured, the server will use the default database, which every Neo4j instance has.
The default database is configurable. For details, see configuration parameters.
The following image illustrates an installation of Neo4j containing the three databases for user data, named
hr, and the
The default database is
Per-user home databases
Per-user home databases are controlled via the Cypher administration commands.
To set a home database for a user, this user must exist as a record in Neo4j. Therefore, for deployments using auth providers other than native, you create a native user with a matching username and then set a home database for that user. For more information on creating native users and configuring a home database for a user, see Cypher Manual → User Management.
Was this page helpful?