Introduction to managing multiple active databases with Neo4j.
With Neo4j 4.2 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 Causal 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 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.2 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 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
Was this page helpful?