Information Technology Reference
In-Depth Information
subclasses STUDENT and STAFF copy the attributes of superclass PERSON. The
translated OODB schema can be shown below:
&ODVV3(56212,'66LQWHJHU1DPHVWULQJ
&ODVV&2856(2,'&RXUVHQRLQWHJHU&RXUVHQDPHVWULQJ3 VWXGHQW
VHW678'(17
&ODVV 678'(17 2,' 6WXGHQW QWHJHU 0DMRU VWULQJ 3 FRXUVH
VHW&2856(DVVXEFODVVRI3(5621
&ODVV '(3$570(17 2,''HSWQDPH VWULQJ)DFXOW\ VWULQJ3 VWDII
VHW67$))
&ODVV67$)) 2,'6WDII QWHJHU 3RVLWLRQVWULQJ 3 GHSDUWPHQW
'(3$570(173 RIILFH VHW2)),&(DVVXEFODVVRI3(5621
&ODVV2)),&(2,'2IILFHLQWHJHU2IILFHQDPHVWULQJ2IILFHORF
VWULQJ3 RFFXSDQW 67$))
$VVXPHZHDUHWRKLUHDQHZVWDIIµ-RKQ'RH¶IRUWKH&RPSXWHU6FLHQFH
'HSDUWPHQW7KH64/WUDQVDFWLRQIRUWKHLQVHUWVWDWHPHQWLV
,16(573(5621661DPHYDOXHµ-RKQ'RH¶
,16(5767$))'HSWQDPH3RVLWLRQYDOXH&63URIHVVRU
By following the algorithm insert, we can translate the SQL statement to the fol-
lowing OSQL statement by locating the composite objects that contain the to-be-
inserted object, and insert the to-be-inserted object with the aggregate attributes
pointing to the composite objects as:
,16(57LQWR3(5621661DPHYDOXHµ-RKQ'RH¶
6(/(&7IURP'(3$570(17ZKHUH'HSWQDPH µ&6¶LQWR2,' FV
,16(57LQWR67$))6WDII3RVLWLRQ3 GHSDUWPHQW YDOXH3URIHVVRU
2,' FV
However, if John Doe resigns, we need to remove his record from the CS depart-
ment. The SQL for the delete statement is:
'(/(7(IURP67$))ZKHUH6WDII
Search WWH ::




Custom Search