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.

88 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

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

Neo4j Virtual Graph with Databricks29 mentions

  • The Lab DatasetUnderstanding Neo4j Virtual Graph10 mentions
  • The Problem with SQL for Graph PatternsUnderstanding Neo4j Virtual GraphFinancial transaction data is everywhere - but finding fraud patterns hidden inside it is surprisingly hard in6 mentions
  • Thinking in GraphsUnderstanding Neo4j Virtual Graphtables map to nodes and relationships in a graph model Describe why a transaction should be modeled as a relationship, not a node Read a simple Cypher MATCH pattern and understand what it is4 mentions
  • Mapping the Schema in Virtual GraphWorking with Virtual Graph on DatabricksVirtual Graph to Databricks via the Neo4j Aura console Map the accounts and transactions tables to nodes and relationships manually Understand what to exclude from the schema mapping and3 mentions
  • Generating the Dataset in DatabricksWorking with Virtual Graph on Databricksdefault small configuration (1,000 accounts, 50,000 transactions) is recommended for a first3 mentions

Neo4j Virtual Graph with Snowflake30 mentions

  • The Lab DatasetUnderstanding Neo4j Virtual Graph10 mentions
  • The Problem with SQL for Graph PatternsUnderstanding Neo4j Virtual GraphFinancial transaction data is everywhere - but finding fraud patterns hidden inside it is surprisingly hard in6 mentions
  • Thinking in GraphsUnderstanding Neo4j Virtual Graphtables map to nodes and relationships in a graph model Describe why a transaction should be modeled as a relationship, not a node Read a simple Cypher MATCH pattern and understand what it is5 mentions
  • Mapping the Schema in Virtual GraphWorking with Virtual Graph on SnowflakeGraph should find rings from the transaction pattern3 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 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

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

GraphRAG Hackathon3 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

All glossary terms