正在加载图片...
Database Modification(Cont) Update. There are two cases If a tuple t2 is updated in relation r2 and the update modifies values for foreign key a, then a test similar to the insert case is made Let t2 denote the new value of tuple t2. The system must ensure that t2]∈Ik(r1 If a tuple t, is updated in r1, and the update modifies values for the primary key(K), then a test similar to the delete case is made 1. The system must compute a=tiKI (2) using the old value of t,(the value before the update is applied) 2. If this set is not empty the update may be rejected as an error, or the tuples in the set may be deleted Database System Concepts OSilberschatz. Korth and SudarshanDatabase System Concepts 6.7 ©Silberschatz, Korth and Sudarshan Database Modification (Cont.) Update. There are two cases: If a tuple t2 is updated in relation r2 and the update modifies values for foreign key , then a test similar to the insert case is made: Let t2 ’ denote the new value of tuple t2 . The system must ensure that t2 ’[]  K(r1 ) If a tuple t1 is updated in r1 , and the update modifies values for the primary key (K), then a test similar to the delete case is made: 1. The system must compute  = t1[K] (r2 ) using the old value of t1 (the value before the update is applied). 2. If this set is not empty 1. the update may be rejected as an error, or 2. the tuples in the set may be deleted
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有