
From "Performance Evaluation of Multidimensional Array Storage 
      Techniques in Databases"
     N.Wildmann & P. Baumann

2 Arrays,
    tomo :  A 3D Volumetric tomograph, a medical scan.
            8bit unsigned integer (byte) intensity values
            256 * 256 * 154 cells

            Used for 'index-based' tests, thus the actual values
            are irrelevant.

    earth : 15 Satellite photographs of earth
            8bit unsigned  integer (byte) intensity values
            800 * 800 * 15 pixels

            9 images contain images with values ranging from 0..249
            3 images contain a single value, 253, 254 ,255 resp.
            3 images contain values from 0..249 in all but one cell,
                     with a single cell of value 250, 251 ,252 resp.

            Used in value-based selection, using the values 250..255
            to 'implicitly select 0..6 images.

Mappings,
    SQL, basically sets of tuples:(x:int, y:int, z:int, val:byte)
    RAL, A 'tiled' data storage with 64KB quadratic shaped tiles.

3 Queries,
    1 : Subselection queries on the 3D tomograph.
        Selectivities tested 0.5% 1% 2% 5% 10% 20% 50% 100%
    2 : An OLAP-style ROLL-UP summing up 7 consecutive layers to produce
        a single 2D array (from the 3D tomograph) 
    3 : Content based selection from the earth photos.

SQL:
    SELECT x, y, z, val 
    FROM tomo 
    WHERE x BETWEEN 20 AND 138 AND 
          y BETWEEN 10 AND 128 AND 
          z BETWEEN 30 AND 101 

    SELECT x, z, SUM(val) 
    FROM tomo 
    WHERE y BETWEEN 47 AND 53 
    GROUP BY x, z 

    SELECT * FROM earth e1 
    WHERE e1.x <= 254 AND 
          e1.y <= 254 AND 
          e1.id IN ( SELECT e2.id FROM earth e2 
                     WHERE e2.val = 250 OR 
                           e2.val = 251 );

RAL:
    SELECT img[20:138,10:128,30:101] 
    FROM tomo_cubed_64 
    AS img

    SELECT img[*:*,47,*:*] + img[*:*,48,*:*] + img[*:*,49,*:*] + 
           img[*:*,50,*:*] + img[*:*,51,*:*] + img[*:*,52,*:*] + 
           img[*:*,53,*:*] 
    FROM tomo_cubed_64 
    AS img 

    SELECT img[0:254,0:254] 
    FROM earth 
    AS img 
    WHERE some_cell ( img = 250 OR 
                      img = 251 )

