Transactions are built into the core of NexusDB. Every (data manipulating) interaction with NexusDB occurs within the context of a transaction. Using transactions you can maintain the integrity of your data within NexusDB. You can commit multiple changes to NexusDB in a unified operation or, in the event of an error or exceptional condition, rollback all the changes cleanly.
NexusDB has taken transactions to the next level with Snapshot transactions. A NexusDB exclusive, Snapshot transactions enable a consistent view of the database without locks of any kind. It works by creating a snapshot of the buffer blocks when subsequent transactions modify data. Using Snapshot transactions, writing does not block reading and reading does not block writing. Maximum concurrency and throughput is achieved without compromising data consistency. Snapshot transactions are used in SQL SELECT statements so all your queries leverage these benefits automatically.
NexusDB also supports nested transactions. What this means to you is more flexibility and simplicity in handling of error conditions. With nested transactions you can partition your operations naturally and respond to errors along those boundaries. You can easily roll back the inner transaction and continue with further modifications while preserving the modifications made in you outer transactions. This is particularly useful when dealing with complex data manipulation logic that requires several alternative paths.
In addition, NexusDB supports a complete implementation of the two-phase commit protocol to ensure data integrity under the most rigorous conditions. Using fail-safe transactions, NexusDB writes to a journal file first and then updates the core database. This means that even if you pull the plug, your data will be brought back to a consistent state: reconstructed from the journal or rolled back to the previous values.
NexusDB has the most comprehensive transactional support
for the Delphi/C++Builder developer today.