cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Running multiple databases

I'm trying to run multiple databases at the same time and query data to and from them.
I successfully created these databases using the following query:

CREATE DATABASE databasename1;
CREATE DATABASE databasename2;

But I am now uncertain about how I should add data to each of these individual databases. For example, if I'd run something like:

CREATE (u:User {name: "John"});

in which database context will this be executed? How to change this context?

Thanks!

4 REPLIES 4

Is this in Neo4j Browser, or via a driver. If browser, you need to select the database that your commands will executed against.

try the following to switch between each:
:use databasename1
:use databasename2

I'm trying to achieve this in the nodejs driver.

Then, I believe you can specify which database when getting a session. You can pass a map of configuration key/value pairs to the session method.