Database Reference
In-Depth Information
row is denoted as UQ row . Each UQ row is a set of columns and each column is denoted by
UQ col . UQ rown ( UQ colm ) denotes a value stored in UQ colm of UQ rown . UQ tablesSize denotes
the size of UQ tables . UQ rowSize denotes the size of UQ row . UQ colNamesSize denotes the size
of UQ colNames . UQ array denotes a two dimensional array that stores the retrieved rows.
.
5.4
Join Query Algorithm
This algorithm retrieves a combined table rows from two CTTs, two VETs, or a VET
and a CTT based on a common
eld between them using different types of joins
including Left Join, Right Join, Inner Join, Outer Join, Left Excluding Join, Right
Excluding Join, and Outer Excluding Join. In this section, a sample algorithm of the
Left Join is outlined in Algorithm 7.
Denition 7 (Left Join Query Algorithm). LJQ leftTable denotes a left table of the left
join operation. LJQ rightTable denotes a right table of the left join operation. S leftTable
denotes a string of the SELECT clause for the left table. S rightTable denotes a string of the
SELECT clause for the right table. W leftTable denotes a string of the WHERE clause for
the left table. W rightTable denotes a string of the WHERE clause for the right table.
LJQ leftPK denotes a set of primary keys of the left table. LJQ rightPK denotes a set of
primary keys of the right table. LJQ rightFK denotes a set of foreign keys of the right table
refrencing the primary keys of the left table. LJQ twoVETs denotes a row matrix with n rows
and 2 columns. The
rst column stores a LJQ twoVETsn ; 0 that denotes a
'
table_row_id
'
of
the LJQ leftTable : The second column stores a LJQ twoVETsn ; 1 that denotes a
'
table_row_id
'
of
the LJQ rightTable : LJQ CTTandVET denotes a row matrix with n rows and 2 columns. The
rst
column stores a LJQ CTTandVETn ; 0 that denotes the primary key of the LJQ leftTable which is a
CTT. The second column stores a LJQ CTTandVETn ; 1 that denotes a
'
table_row_id
'
of the
LJQ rightTable which is a VET. LJQ leftRows denotes a set of rows of the left
table.
Search WWH ::




Custom Search