Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)
170 Chapter 10
Technical Articles
IMAGE/SQL with TurboIMAGE/XL Enhancements
IMAGE/SQL Enhancements
Information regarding enhancements to IMAGE/SQL for SQL access is
described in this section:
• Predicate level lock when updating masters
• Support for B-Tree indices
• Support for third-party composite indices
• New ODBC driver, ODBCLink/SE
Predicate Locks when Updating Manual Masters
IMAGE/SQL version B.G2.07 is enhanced to apply predicate level locks
(row level locks), instead of a set level lock as in prior versions, when
updating selected entries in the manual master data set.
When IMAGE/SQL is used as the SQL interface to TurboIMAGE/XL
database, the responsibility of enforcing appropriate locks rests with
IMAGE/SQL. These locks should conform to the locking schemes
present in TurboIMAGE/XL. Accordingly, locks are set by IMAGE/SQL
depending on the DBOPEN modes and isolation level requirements. At
present, for a master dataset, for all modify intrinsics, that is, insert,
delete and updates, and for DBOPEN modes 1 to 4, IMAGE/SQL puts a
set level lock (or a pseudo set level lock covering all the rows in the set).
But for update function in DBOPEN mode 1, setting a set level lock (or
pseudo set lock) is not mandatory, a row level lock would be sufficient.
Therefore, IMAGE/SQL will now lock at the predicate level if a 'where'
clause is specified, otherwise a set lock will be given. This feature is
actually transparent to the user.
Benefits
When multiple users are operating on the same data set, it is difficult to
update different entries with set level lock in place. But when a
predicate level lock is in effect, the unnecessary wait time is avoided,
thus allowing multiple updates of different entries on the same data
set.
For an example, User A has an update statement:
UPDATE Music.Albums set RecordingCo=’ABC Music Ltd.’ where Medium=’ca’;
The kind of lock that is placed can be seen by invoking DBUTIL as
shown: