One writer and multiple readers at the table level

On a given table, IQ permits only one user to have write access for doing insertions and deletions, and multiple readers to issue queries concurrently.

Imagine a situation such as the one shown in Figure 10-1. First, User 1 begins a transaction and starts to insert data into the customer table. As long as User 1’s transaction remains open, no other user can write to the customer table. Any transaction that attempts to write to the customer table receives an error until User 1’s transaction commits.

In Figure 10-1, User 2 gets an error for attempting to write before User 1’s transaction commits. User 2’s application determines whether to roll back the transaction, or to try writing to a different table. However, User 2 cannot write to the customer table again in the same transaction.

Figure 10-1: Only one writer at a time

Shown is a diagram illustrating one writer at a time

Meanwhile, other users can read from the Customers table at any time. In this way queries can proceed while the database administrator inserts and deletes table data. In Figure 10-2, User 3 and User 4 are able to query the Customers table while User 1's write transaction remains open.

Figure 10-2: One writer, multiple readers

Shown is a diagram illustrating one writer and multiple readers