Multiple writers and readers in a database

Within an IQ database, multiple read-only and read-write users can operate concurrently, as long as the writers are inserting data into (or deleting it from) different tables. So, for example, while User 1's transaction is inserting and deleting in the Customers table, User 2 can begin a transaction that loads data into the Employees table, as shown in Figure 10-3. At the same time other users can execute transactions that issue queries to both of these tables, or to any other tables in the database.

In general, read-only users connect to any secondary server and read-write users connect to the write server. Read-write users may also connect to query servers, but can only modify local data in global or temporary tables and SQL Anywhere base tables.

Figure 10-3: Concurrent insertions to different tables

Shown is a diagram illustrating concurrent insertions to different tables

Data definition operations on a single table lock out all other readers and writers from that table. See “Locks for DDL operations” for details.