Neo4j 4.x Multi‑Database Connection String Syntax Change Requires Updated Driver Configuration
0 reputation · 25 Oct 2020, 03:42 UTC
When upgrading from Neo4j 3.x to 4.x, the database introduced native multi‑database tenancy, which changes how a client specifies the target database. The goal is to define a connection string format that works consistently across driver versions while allowing applications to access either the default database or a named one without hard‑coding server‑specific details.
Constraints include maintaining backward compatibility with Neo4j 3.x drivers that ignore the database parameter, adhering to the official Bolt protocol version negotiation, and avoiding connection‑string patterns that cause the driver to fall back to the default database unintentionally. There is uncertainty about whether the database name should be supplied in the URI query string, as part of the path, or via driver‑level configuration, and how each option behaves when the server runs a mixed version cluster.
What is the recommended URI scheme for specifying a target database in Neo4j 4.x drivers? How should applications handle fallback to the default database when the database name is omitted? Does embedding the database name in the connection string affect connection pooling or session creation overhead?