Information Technology Reference
In-Depth Information
These seqno columns are incremented by one for each new record. For example,
for the CLIENTACCOUNTEXECUTIVE table. The seqno is 1 and 2 for clientid
600001 (Fong et al. 2006 ).
On inserting a new record to a table, the insert trigger first finds out which col-
umn is used for counting seqno from the node_tablecolumn_mapping table. Then,
the trigger selects the maximum seqno value for the new record. The maximum
seqno value plus one will be assigned as the seqno value of the new record. For ex-
ample, a new record inserted to the table CLIENTACCOUNTEXECUTIVE on the
next page for clientid 600001 gets a new seqno value 3 since the maximum seqno
for clientid 600001 already in the table is 2.
There is no need to update the seqno value in case record is deleted. In XQL, the
location index function (e.g., position()) counts the order of the record relative to
the parent node.
Client Table
Clientid
Title
lastname
firstname
600001
Mr
Chan
Peter
600002
Mrs
Wong
Ann
600003
Miss
Lee
Jane
Phone
fax
email
seqno
27825290
27825291
Peter@tom.com
1
24588900
21588200
Ann@ibm.com
1
27238900
36225555
Jane@msn.com
1
Clientorder table
clientid
orderid
Tradedate
stockid
Inputquantity
600001
300001
20020403
000003
10000
600002
300002
20020403
000004
10000
600003
300003
20020404
000003
20000
600003
300004
20020405
000004
6000
600002
300005
20020405
000941
6000
Action
ordertype
Allornothing
inputdatetime
Seqno
Buy
Limit
N
200204031001
1
Buy
Limit
N
200204031002
2
Sell
Limit
N
200204041101
1
Buy
Limit
N
200204051408
2
buy
Limit
N
200204051506
1
 
Search WWH ::




Custom Search