Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Semestr2 / 1 - Oracle / Oracle selected docs / Database concepts.pdf
Скачиваний:
29
Добавлен:
12.05.2015
Размер:
6.96 Mб
Скачать

Types of Integrity Constraints

updates and deletes will wait for row-level locks on the indexes of the child table to clear.

Figure 21–9 Locking Mechanisms When Index Is Defined on the Foreign Key

Table Parent

Row 1

Key 1

 

 

Row 2

Key 2

 

 

Row 3

Key 3

 

 

Row 4

Key 4

 

 

Index

Key 1

Key 2

Key 3

Key 4

Table Child

Row 1

Key 1

 

 

Row 2

Key 1

 

 

Row 3

Key 3

 

 

Row 4

Key 2

 

 

Row 5

Key 2

 

 

Exclusive row lock acquired

Newly updated row

Index

Key 1

Key 1

Key 2

Key 2

Key 3

If the child table specifies ON DELETE CASCADE, then deletes from the parent table can result in deletes from the child table. In this case, waiting and locking rules are the same as if you deleted yourself from the child table after performing the delete from the parent table.

CHECK Integrity Constraints

A CHECK integrity constraint on a column or set of columns requires that a specified condition be true or unknown for every row of the table. If a DML statement results

21-20 Oracle9i Database Concepts

Соседние файлы в папке Oracle selected docs