Database Reference
In-Depth Information
Fig. 4. The three EETPS database models
5 Elastic Extension Tables Proxy Service Algorithms
In this section, we present the main algorithms of EETPS functions and some subsidiary
algorithms of these main algorithms. Each of these algorithms has a special abbreviation
structure that is used to de
ne its variables. The structure of the abbreviation consists of
two parts. The
rst part is a pre
x that consists of the abbreviation of the algorithm
name. The second part is a suf
x name that represents the variable name. For example,
STQ rowID is one of the de
nition names that is presented for the Single Table Query
algorithm, which is the
x of the
abbreviation consists of the initial characters of the algorithm name, which is STQ, and
the suf
rst algorithm that is presented in this section. The pre
x of the abbreviation is rowID. This abbreviation pattern is also used for the rest
of the algorithms. In addition, common de
nitions are used in the following algorithms,
and for simplicity we are listing them at the beginning of this section as follows:
T denotes a tenant ID. B denotes a table name. S denotes a string of the SELECT clause
parameters. W denotes a string of the WHERE clause. F denotes the
rst result number
of a query limit. M denotes the maximum number of a query limit.
5.1
Single Table Query Algorithm
This section presents the main algorithm and some subsidiary algorithms of the Single
Table function that retrieves table rows from a CTT or a VET. This algorithm has three
different cases to retrieve table rows from a VET. Firstly, retrieving rows from a VET
by specifying a set of primary keys. Secondly, retrieving rows from a VET by spec-
ifying a set of table rows IDs that are stored in
ET. Thirdly, retrieving all
rows of a CTT or a VET without specifying any primary key or row ID.
'
table_row
'
Single Table Main Algorithm: This algorithm is used to retrieve table rows from one
single table either a CTT or a VET, and it is outlined in Algorithm 1.
Denition 1 (Single Table Query Main Algorithm). STQ rowID denotes a set of table
rows IDs. STQ PK denotes a set of primary keys. STQ type denotes the table type (CTT or
VET). STQ index denotes a set of VET indexes. STQ PKIndex denotes a primary key
indexes of a VET. STQ CTT denotes a set of retrieved rows from a CTT. STQ VET denotes
a set of retrieved rows from a VET. STQ array denotes a two dimensional array that
stores the retrieved rows.
Search WWH ::




Custom Search