Information Technology Reference
In-Depth Information
6(/(&73 N IURP& N ZKHUH$ 9Y DQG«$ Q 9Y Q LQW R 2,' & N
83'$7(& D VHW3 D 3 D ^ 2,' & N `ZKHUH$ D 99 I
«
83'$7(& DP VHW$ DP $ DP ^ 2,' & N `ZKHUH$ DP 99 IP
83'$7(& E VHW3 E 3 E ^ 2,' & N `
«
83'$7(& DP VHW3 ES 3 ES ^ 2,' & N `
Step 3. Delete the to-be-deleted object.
We can then delete the to-be-deleted object from its class C k as:
'(/(7($//IURP& N ZKHUH$ 9Y DQG«$ Q 9Y Q
Note: ALL is needed to delete all the subclasses' objects only if deleting a super-
class object.
5.10.1
Relational Operation Update
Suppose we want to replace the value of an attribute v k from value V(v k1 ) to V(v k2 )
in the relation R k (which maps to class C k ). Basically, we consider two cases. In the
first case, v k is not a foreign key. It corresponds to an attribute in the corresponding
object, and thus we need an update statement of OSQL to perform the replacement.
In the second case, v k is a foreign key. Replacing a value in this case involves
changing the aggregate attributes of its composite as shown below:
Step 1. Locate the to-be-updated object.
We can map a to-be-updated tuple in relation R k to a corresponding to-be-updat-
ed object in class C k as:
64/83'$7( 5 N VHWY N 9Y N ZKHUHY 9Y DQG Y 9Y «
Y Q 9Y Q
3UHSURFHVVVFKHPDWUDQVODWLRQ5HODWLRQ5 N Y Y «Y Q 9 I «9 IP
&ODVV& N $ $ «$ Q 3 F «3 FP 3 S
Step 2 (optional). Update aggregate attribute of composite objects containing to-be-
updated object.
If the to-be-updated attribute is an aggregate attribute (P c or P p ), we can locate
the aggregate attribute P c or P p in the to-be-updated object, and then delete (the
Search WWH ::




Custom Search