CHAPTER 8 Transactions and Versioning
299
Versioning prevents inconsistencies
Without versioning, concurrent read and write operations could cause
inconsistencies in the database. The table-level versioning provided by
Adaptive Server IQ prevents inconsistencies both by serializing transactions,
and by making the table the version level.
Adaptive Server IQ allows multiple writers to modify a table serially—that is,
one after the other, never more than one at a time—while multiple readers
continue to work on an original copy of the table. With this method, IQ takes
on full responsibility for preventing inconsistencies.
While any transaction processing system is designed to ensure that the database
remains consistent, the Adaptive Server IQ approach means that users don't
need to worry about placing their queries and updates in appropriate
transactions. IQ begins and ends transactions automatically, and ensures that
read and write operations do not interfere with each other.
How locking works
All Adaptive Server IQ locks occur automatically, based on the type of
operation a user requests. You do not need to request a lock explicitly. The
transaction that has access to the table is said to hold the lock.
When a table is locked in Adaptive Server IQ, no other transaction can have
write access to it, but any transaction can have read access to it. Data definition
operations form an exception to this universal read access; see the discussion
below for details. Any other write transaction that attempts to access a table
with a write lock on it receives an error.
The locks maintain the reliability of information in the database by preventing
concurrent access by other transactions. The database server retains all the
locks acquired by a transaction until the transaction completes, due to either a
commit or a rollback.
Locks for DML operations
Data Manipulation Language (DML) operations include insertions, deletions,
and queries. For all such operations, Adaptive Server IQ permits one writer and
multiple readers on any given table. This rule has the following implications:
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...