Fujitsu UDS/SQL V2.5 Network Router User Manual


 
Schema DDL Types of access
U929-J-Z125-9-76 89
Dokuschablonen 19x24 Version 7.3us für FrameMaker V7.x vom 14.02.2007 © cognitas GmbH 2001-2007
24. Oktober 2007 Stand 09:30.23 Pfad: G:\vogt\fsc\uds\Manuale\en\udsent_e\udsent.k04
Example 1
The following exemplifies the conversion of a key value into a physical address using
the UDS/SQL standard hash routine.
Let the key value be 9952333 and the number of pages in the hash area be 503. This
results in the following arithmetic operations:
1) Beginning from the 9952/333
left, the key value
is subdivided into
words (units of
four bytes length).
2) An exclusive OR is F9F9F5F2 > 11111001 11111001 11110101 11110010
performed with the 00F3F3F3 > 00000000 11110011 11110011 11110011
corresponding binary 
representation. 11111001 00001010 00000110 00000001
3) The first bit is set 01111001 00001010 00000110 00000001=790A0601
to 0 (positive).
4) The result is 790A0601
16
: 503
10
divided by the
number of pages =2030700033
10
: 503
10
= 4037117 Remainder= 2
in the hash area.
The remainder gives the physical address in the form of a relative page number (see
the section “Structure of a physical page address” on page 131) within the hash area.
If the user employs a user-specific hash routine, the first two operations can be
replaced. UDS/SQL always performs the last two operations.