Please enable JavaScript to view this site.

R:BASE 11 Help

The below table describes the automatic concurrency control and locks used in multi-user mode and the commands that initiate them. Operations that only view data or the database structure are not affected by concurrency control or locking.

 

Type of Lock

Command

Description

Concurrency Control

EDIT

EDIT USING

ENTER

Prevents one user from accidentally overwriting another user's changes. These commands can access the same table simultaneously.

Row Lock

DELETE ROWS

ENTER form  

INSERT values

LOAD FROM filespec

UPDATE

When SET ROWLOCKS is on, a lock is only applied to a row. When off, a table lock is in effect.

Table Lock

BACKUP*

DROP

RULES

FORMS

GRANT

INSERT subselect

RBLABELS

LOAD from filespec

REPORTS

RESTORE

REVOKE

RULES

SET LOCK ON

UNLOAD*

Must wait for commands that obtain table and database locks. Once obtained, this lock excludes all other concurrency control and locking until these commands have finished.

Full Database Lock

BACKUP ALL

RELOAD

UNLOAD ALL

All tables in the database are locked.

Database Schema Lock

ALTER TABLE

CREATE SCHEMA

CREATE TABLE

CREATE VIEW

CREATE INDEX

DROP INDEX

DROP COLUMN

DROP TABLE

DROP VIEW

INTERSECT

JOIN

PROJECT

RENAME

SUBTRACT

UNION

Engages a full database lock preventing schema modifications, then releases the schema lock remaining in table lock.

Cursor Lock

OPEN cursorname

Stops database schema commands but allows table locks; acts as a table lock.

 

*A table lock is placed only if one table is unloaded. A database lock is placed if more than one table is unloaded.

 

The below table shows what happens when different commands try to access a table or database already being used by another command. The columns represent the type of control or lock already placed on the table or database. Each row has a heading with the name of the control or lock needed by the command trying to gain access to a table or database.

 


Concurrency Control

Cursor Lock

Row Lock

Table Lock

Database Lock

Schema Lock

Cursor Lock

Access

Access

Access

Wait

Quit

Wait

Row Lock

Access

Access

Access

Wait

Quit

Wait

Concurrency Control

 

Access

Access

Access

Wait

Quit

Wait

Table Lock

Wait

Wait

Wait

Wait

Quit

Wait

Database Lock

Wait

Wait

Wait

Wait

Quit

Wait

Schema Lock

Wait

Wait

Wait

Wait

Quit

Wait