Database Reference
In-Depth Information
Figure 1. Representation of relational table using multidimensional array
Fx x
(, ,...,
x
)
=
dd
...
dx
multidimensional array and the column value
of each column of the relation is positioned on
the axis of coordinates of each dimension of the
multidimensional array.
As can be seen in the example of Figure 1,
since the fact data is stored as contents of each
cell, the multidimensional array becomes n-1 di-
mensional for an n-column relational table. Using
multidimensional array methods, the linearization
is done as described below. After the linearization
of the array, the offset values of the array cells
that correspond to actual records in the relation
are stored (Hasan et. al; 2007).
Let Ad d
1 2
n
12
n
1
n
+
dd ddx
...
+ ++
...
d xx
12 3
n n
−−
2
1
1
2
1
If the subscript of dimension k is a k and the
length of dimension d i are known then
fx x
(,
,...,
a
,...,)
xddd
=
...
dx
n n
1
k
1
12 3
n
1
n
+
dd
...
dx
+
dd
...
da
++
...
x
12
n n
−−
2 1
12
k
1
k
1
x
=
012
,, ,...,
d
-
1
where
1££
j
n ,
j
j
1££
j
nj
¹ w h e r e
x
=
012
,, ,...,
d
-
1
j
j
1££
j
n ,
j
¹
k
12 be an n dimensional array
with length of each dimension dd
(, ,...,
d n
)
The logical position of the array indices
(, ,...,
1 , ..., . The
n -dimensional array can be mapped into a single
linearized array by an array linearization function.
Assume that the value of the ith dimension of A
is encoded into (,,...,
d n
xx
x n
)
12 is determined by the above func-
tion for forward mapping and is denoted by
(, ,...,
xx
x n
)
Fx x
(, ,...,
x n
)
12 is determined by
the above function for forward mapping and is
denoted by Fx x
12
01
d i - for Ad d
1
)
(, ,...,
d n
)
12
12 . The reverse array
linearization function of the multidimensional
array of A for backward mapping is defined as
follows:
(, ,...,
x n
)
d i - 1£ i n be an n di-
mensional array with length of each dimension
dd
dd
1 , ...,
d n
(,,...,
01
1
)
1 , ..., . The n -dimensional array can be
mapped into a single linearized array by an array
linearization function.Assume that the value of the
ith dimension of A is encoded into (,,...,
d n
RFY
-=
() (, ,...,
y
y
y
)
12
n
d i -
for i n . The array linearization function
for the multidimensional arrays (Li & Srivastava,
2002) of A is
01
1
)
where
y
=
=
mod
[...[
Y d
n
n
y
Y
/
d
]...] /
d
1 mod
]
d
for
2
££-
i
n
1
i
n
i
+
i
y
=
[[...[[
Y
/] /
dd
]...] /] /]
dd
1
n
n
-
1
3
2
Search WWH ::




Custom Search