Geoscience Reference
In-Depth Information
3.5 Array
$
Table Conversion
Converting an array into a table is potentially very useful as SQL may provide
functionality not present in ASQL, and vice versa. UNNEST ing an array simply puts
each array element in a separate row of the result table. The WITH ORDINALITY
fl
integer columns to the
result table, that contain the array indexes. NEST ing a table into an array works in a
similar way, just reversed.
flag preserves the order by adding n ¼ dimension ð array Þ
3.6 Array $ LOB Conversion
Array data is most often exchanged in a certain format, which allows to bundle
further, possibly domain-speci
c details, besides the array cell values. Therefore
ASQL provides
flexible and extensible support, to facilitate exporting (via an
encode operation) and importing (corresponding decode operation) of arrays
from and into an SQL DBMS.
fl
4 Implementation
The concepts discussed thus far have been largely implemented in an open-source
mediator system ASQLDB. 2 ASQLDB extends the HSQLDB relational DBMS (T.
H. D. Group 2013 ) with support for ASQL. Incoming queries are broken down and
array sub-queries are constructed as rasql queries (rasdaman GmbH 2013 ), which
are then forwarded to rasdaman ( www.rasdaman.org , Accessed on 22 August,
2013) for evaluation. The results are merged with the results of the pure SQL sub-
queries and returned to the client. Figure 1 depicts the architecture of ASQLDB.
First performance measurements indicate that our approach of automatic query
separation and result merging has only a slight overhead, over a highly speci
c,
manually implemented query integration. Figure 2 shows benchmark results of a
mixed query on a 2D map of increasing size ($ s in the query below increases from
10, 20, 40,
, 500) that determines the number of cell values in the green channel
of the map section greater than 150:
2
https://github.com/misev/asqldb .
Search WWH ::




Custom Search