<commit_before>Enterprise Capabilities
=======================

Neo4j meets the special requirements for operating in an enterprise environment, ensuring smooth 
operation, data recovery, resilience, data security, and performance.

It features:

* true ACID transactions with JTA support
* high availability (see High Availability chapter)
* scales to billion of nodes and relationships on single machine hardware
* high speed traversals and querying of the data

== Transactions ==

To maintain data integrity and ensure good transactional behavior, Neo4j 
complies with the ACID properties:

* atomicity - if any part of a transaction fails, the database state is left unchanged
* consistency - any transaction will leave the database in a consistent state
* isolation - during a transaction, modified data cannot be accessed by other operations
* durability - the DBMS can always recover the results of a committed transaction

Specifically regarding write operations:

* all modifications to data must be wrapped in transactions
* default isolation level is READ_COMMITTED
* write locks are acquired at the Node and Relationship level
* locks can be acquired manually to achieve higher level of isolation (SERIALIZABLE)
* deadlock detection is built into the core transaction management

For read operations:

* they may occur outside of a transaction
* data retrieved by traversals is not protected from modification by other transactions
* non-repeatable reads may occur (i.e., only write locks are acquired and held until the end of the transaction)

== Data Security ==

Some data may need to be protected from unauthorized access (e.g., theft, 
modification). Neo4j does not deal with data encryption explicitly, but supports 
all means built into the Java programming language and the JVM to protect data 
by encrypting it before storing.

Furthermore, data can be easily secured by running on an encrypted datastore 
at the file system level. Finally, data protection should be considered in 
the upper layers of the surrounding system in order to prevent problems with 
scraping, malicious data insertion, and other threats.

== Data Integrity ==

In order to keep data consistent, there needs to be mechanisms and structures 
that guarantee the integrity of all stored data. In Neo4j, there are different subsystems that need data integrity:

=== Core Graph Engine ===

In Neo4j, the whole data model is stored as a graph on disk and persisted as 
part of every committed transaction. In the storage layer, Relationships, Nodes, 
and Properties have direct pointers to each other. This maintains integrity 
without the need for data duplication between the different backend store files.
 
=== Different Data Sources ===

In a number of scenarios, the core graph engine is combined with other systems 
in order to achieve optimal performance for non-graph lookups. For example, 
Apache Lucene is frequently used as an additional index system for text queries 
that would otherwise be very processing-intensive in the graph layer.

To keep these external systems in synchronization with each other, Neo4j provides 
full Two Phase Commit transaction management, with rollback support over all data 
sources. Thus, failed index insertions into Lucene can be transparently rolled 
back in all data sources and thus keep data up-to-date.

== Data Integration === 
<commit_msg>collapsed transaction section, which is duplicated in a separate transaction document<commit_after>Enterprise Capabilities
=======================

Neo4j meets the special requirements for operating in an enterprise environment, ensuring smooth operation, data recovery, resilience, data security, and performance.

It features:

* true ACID transactions with JTA support
* high availability (see High Availability chapter)
* scales to billion of nodes and relationships on single machine hardware
* high speed traversals and querying of the data

== Transactions ==

All mutating data operations must occur within a transaction, ensuring proper ACID behavior. 

== Data Security ==

Some data may need to be protected from unauthorized access (e.g., theft, modification). 
Neo4j does not deal with data encryption explicitly, but supports all means built into the Java programming language and the JVM to protect data by encrypting it before storing.

Furthermore, data can be easily secured by running on an encrypted datastore at the file system level. Finally, data protection should be considered in the upper layers of the surrounding system in order to prevent problems with scraping, malicious data insertion, and other threats.

== Data Integrity ==

In order to keep data consistent, there needs to be mechanisms and structures that guarantee the integrity of all stored data. In Neo4j, there are different subsystems that need data integrity:

=== Core Graph Engine ===

In Neo4j, the whole data model is stored as a graph on disk and persisted as 
part of every committed transaction. In the storage layer, Relationships, Nodes, 
and Properties have direct pointers to each other. This maintains integrity 
without the need for data duplication between the different backend store files.
 
=== Different Data Sources ===

In a number of scenarios, the core graph engine is combined with other systems 
in order to achieve optimal performance for non-graph lookups. For example, 
Apache Lucene is frequently used as an additional index system for text queries 
that would otherwise be very processing-intensive in the graph layer.

To keep these external systems in synchronization with each other, Neo4j provides 
full Two Phase Commit transaction management, with rollback support over all data 
sources. Thus, failed index insertions into Lucene can be transparently rolled 
back in all data sources and thus keep data up-to-date.

== Data Integration === 

{'fraction_non_alphanumeric': 0.04217896174863388, 'fraction_numerical': 0.001878415300546448, 'mean_word_length': 4.851148851148851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6411746', 'n_tokens_mistral': 1330, 'n_tokens_neox': 1261, 'n_words': 835}