show.query: Show preference in usual Query Languages
Description
For a given preference this shows the PREFERRING clause of a database query in different SQL dialects which support preferences.
Usage
show.query(p, dialect = "EXASOL")
Arguments
p
A preference
dialect
The preference query dialect, which determines the Syntax of the returned query. This has to be one of the following:
[object Object],[object Object]
Details
There are few database systems supporting Skyline queries.
A Skyline query consists of a usual SQL query followed by a PREFERRING-clause (in some rarely used dialects also SKYLINE OF).
For example consider a database table r(a,b). The preference selection psel(r, low(a) * high(b)) can be expressed by (in the Exasol dialect):
SELECT * FROM r PREFERRING LOW a PLUS HIGH b
The show.query function generates just the PREFERRING-clause, i.e. show.query(low(a) * high(b)) returns
PREFERRING LOW a PLUS HIGH b
As usual in SQL queries all keywords are not case sensitive, i.e. PLUS or plus does not make any difference.
References
W. Kiessling, M. Endres, F. Wenzel (2011): The Preference SQL System - An Overview. IEEE Data Engineering Bulletin, Vol. 34 No. 3, pages 12-19.