Drivers

transaction

A unit of work that either succeeds in full or leaves no trace.

Also written: transactions

Example

Two writes in one unit of work.

python
def transfer_funds(tx, from_account, to_account, amount):
    # Deduct from first account
    tx.run(
        "MATCH (a:Account {id: $from_}) SET a.balance = a.balance - $amount",
        from_=from_account, amount=amount
    )
 
    # Add to second account
    tx.run(
        "MATCH (a:Account {id: $to}) SET a.balance = a.balance + $amount",
        to=to_account, amount=amount
    )

Both balances change together. If the second statement fails, neither of them does: the transaction rolls back, and the graph is as it was before the first.

Lessons that use this term

The lesson and course links below open in a new tab.

71 lessons use this term. The 40 with the highest term density are listed here.

Using Neo4j with .NET20 mentions

  • Write transactionsBest practicesdo you run a transaction in the Neo4j .NET1 mention
  • Transaction managementBest practicesa production application, you may also need finer control of database transactions or to run multiple related queries as part of a single17 mentions
  • Error handlingBest practicesproperty indicates whether retrying the operation might succeed. Transaction functions (ExecuteReadAsync / ExecuteWriteAsync) automatically retry retriable errors, but if you are using2 mentions

Importing CSV data into Neo4j9 mentions

  • TransactionsImporting data considerationsCypher queries you have written will run within a single transaction9 mentions

Aura In Production128 mentions

  • Transaction monitoringMonitoring Database Healthinside your database, you need to go deeper—every query executes within a transaction, and monitoring transaction patterns reveals connection leaks and application bugs that query metrics alone can't73 mentions
  • Heap Memory UsageMonitoring Instance Performancememory area where Neo4j stores temporary data during query execution and transaction15 mentions
  • Monitoring Out of Memory ErrorsMonitoring Resourcesthey occur, queries and transactions fail immediately, making this a critical incident that requires immediate11 mentions
  • Monitoring CPU UsageMonitoring Resourcesrequests, I/O threads manage network communication with clients, and transaction threads handle the transaction12 mentions
  • Viewing your metricsMonitoring ResourcesConnections: Number of connections actively running Cypher transactions5 mentions
  • Bolt ConnectionsMonitoring Instance Performancea connection starts a transaction, it holds that connection until the transaction4 mentions
  • Checkpoint and Replan EventsMonitoring Database Healthtypically run every 15 minutes or every 100,000 transactions, whichever comes3 mentions
  • Monitoring Garbage CollectionMonitoring Instance Performancegeneration handles long-lived objects like cached data and transaction2 mentions

Using Neo4j with Python18 mentions

  • Transaction managementBest practicesa production application, you may also need finer control of database transactions or to run multiple related queries as part of a single17 mentions
  • Transaction functionsBest practicesfunction called get_cheapest_flights to execute a read query within a transaction1 mention

Using Neo4j with Go19 mentions

  • Transaction managementBest practicesa production application, you may also need finer control of database transactions or to run multiple related queries as part of a single17 mentions
  • Transaction functionsBest practicesfunction called getCheapestFlights to execute a read query within a transaction1 mention
  • Error handlingBest practicesfailures Constraint errors - Violations of database constraints Transaction errors - Deadlocks, timeout issues Query errors - Syntax errors, parameter1 mention

Using Neo4j with Java18 mentions

  • Transaction managementBest practicesa production application, you may also need finer control of database transactions or to run multiple related queries as part of a single14 mentions
  • Transaction functionsBest practicesfunction called getCheapestFlights to execute a read query within a transaction1 mention
  • Handling Database ErrorsBest practicesRaised when the connection to the database times out (transaction took longer than timeout - 30 seconds, by default) DatabaseException - Raised when there is a problem with the3 mentions

Neo4j Management, Optimization, and Refactoring Workshop21 mentions

  • Memory UsageAura Administrationmemory area where Neo4j stores temporary data during query execution and transaction15 mentions
  • Viewing your metricsAura AdministrationConnections: Number of connections actively running Cypher transactions5 mentions

Building Neo4j Applications with TypeScript14 mentions

  • Executing QueriesNeo4j & TypeScriptautomatically handles sessions, transactions, and retries for14 mentions

Building Neo4j Applications with Spring Data10 mentions

  • Spring Data Neo4j Building BlocksGetting Startedyou might notice that you don't create a driver object and manage sessions and transactions to connect the application to10 mentions

Graph Data Science in Practice26 mentions

  • Fraud DetectionCommunity Detection for FraudTraditional fraud detection looks at individual transactions12 mentions
  • Building Fraud CommunitiesCommunity Detection for Fraudfraud risk users through guilt-by-association Validate results against transaction7 mentions

Building GraphRAG Python MCP tools4 mentions

  • Using Context within ToolsBuilding Database-Connected Featuresrunning multiple queries that are related, consider using transactions to ensure data4 mentions

Building GraphRAG TypeScript MCP tools4 mentions

  • Shared State and LoggingBuilding Database-Connected Featuresrunning multiple queries that are related, consider using a session and transaction to ensure data4 mentions

Get started with Graph Data Science5 mentions

  • GDS orientationGet started with the Graph Data Science libraryconnected component showing a transaction3 mentions

Neo4j Administration Workshop18 mentions

  • MemoryConfigureJVM heap is where Neo4j stores Java objects at runtime — query results, transaction state, and intermediate5 mentions
  • Monitoring Tool OverviewLogs and MonitoringTransactions — committed, rolled back, active (per database: neo4j.database.{name}.transaction.) Memory — heap used, page4 mentions
  • BackupConfigurethe whole database again, it finds the previous backup and pulls only the transactions committed since then from the transaction2 mentions
  • ApproachInvestigationCSV or monitoring tool | | Average committed transactions/s | neo4j.database.{name}.transaction.committed CSV | | Active Bolt connections |2 mentions
  • Log FilesLogs and MonitoringStack traces for unexpected errors Memory and store engine events Transaction and checkpoint activity Cluster communication (in clustered2 mentions
  • neo4j-adminInstalla summary for each database showing whether it is in use, the last committed transaction ID, and whether the store needs1 mention

Context Graphs: Agent Memory with Neo4j11 mentions

  • The Persistent Knowledge ProblemLong-Term Memorybetween entities — a customer is connected to accounts, accounts to transactions, transactions to2 mentions
  • What is a context graph?Context Graphs and Reasoning MemoryGraph | | --- | --- | | Records actions only | Captures the full "why" | | "Transaction rejected at 14:32" — isolated timestamp | Decision traces and causal chains — full provenance | | No relationships3 mentions
  • Why graphs over vector embeddingsLong-Term MemoryConsider a request like "show me the customer, all their accounts, the transactions on each account, the organization they work for, and any compliance flags linked to that2 mentions

GraphRAG Hackathon2 mentions

  • Prepare your graph for hackingIntroduction to GraphRAGme to this person?" — shortest path "Which accounts are part of a suspicious transaction ring?" — fraud detection "What topics are experts in my field writing about?" — knowledge1 mention

Neo4j Fundamentals3 mentions

All glossary terms