Information Technology Reference
In-Depth Information
existing) and insert (the new) aggregate attribute of these composite objects in the
associated class C
a1
, … C
am
, C
b1
, … C
bp
as.
6(/(&7 3
F
3
FP
3
S
IURP &
N
ZKHUH$
9Y
DQG«$
Q
9Y
Q
LQWR
2,'
&
N
83'$7(&
DN
VHW3
DN
3
DN
2,'
&
N
83'$7(&
D¶N
VHW3
D¶N
3
D¶N
2,'
&
N
83'$7(&
EN
VHW3
EN
3
EN
2,'
&
N
83'$7(&
E¶N
VHW3
E¶N
3
E¶N
2,'
&
N
Step 3. Update the to-be-updated object.
We can then update the to-be-updated object from its class C
k
as:
83'$7(&
N
VHWY
N
9Y
N
ZKHUHY
9Y
DQGY
9Y
«Y
Q
9Y
Q
5.10.2
Case Study of Transaction Translation from SQL to OSQL
Suppose we have an enrollment system with the following RDB schema:
5HODWLRQ3(5621
66
1DPH
5HODWLRQ&2856(
&RXUVHQR
&RXUVHQDPH
5HODWLRQ678'(17
66
#6WXGHQW0DMRU
5HODWLRQ&2856(5(*,67(5
&RXUVHQR
6WXGHQW
5HODWLRQ'(3$570(17
'HSWQDPH
)DFXOW\
5HODWLRQ67$))
66
#6WDII'HSWQDPH3RVLWLRQ
5HODWLRQ2)),&(
2IILFH
2IILFHQDPH2IILFHORF6WDII
where underlined words are primary keys, words with @ prefixes are candidate
keys, and words with * pprefixes are foreign keys.
By following the pre-process step 1, we map each relation to a class such that
each primary key of a tuple is transformed into an OID and an attribute in an object.
In step 2, each attribute of a tuple is mapped to an attribute in an object. In step
3, the foreign keys Dept-name and Staff# are mapped to aggregate attribute P
dept
,
P
staff
with values pointing to the OID of DEPARTMENT and STAFF. In step 4, the
relationship relation COURSE-REGISTER is mapped to aggregate P
course
and P
stu-
dent
with set values pointing to the OID of COURSE and STUDENT. In step 5, the
Search WWH ::
Custom Search