Neo4j allows you to have multiple graph databases on the same Neo4j server. Each graph database is identified by a unique name and is essentially a separate graph storage location. These different graph databases can be switched between, but at any given time, one database is the default.
If you do not explicitly designate a default database during the creation of the driver or session, the driver must communicate with the database engine to identify the default graph database. Subsequently, this information is relayed back to the client, and the client-side driver establishes a connection to that particular database, resulting in additional network overhead.
In the case of Neo4j Aura, it operates as a single database instance, consistently named "neo4j" and this designation remains unchanged. Therefore, setting the database name to "neo4j" can help reduce network traffic and minimize network latency between applications and the Aura instance.
with driver.session(database="neo4j") as session:
people = session.execute_read(
for person in people:
print(person.data()) # obtain dict representation