SQL Abstract Syntax Trees Vocabulary
type: Ontology
version info: 0.3
term status: unstable
description: A vocabulary that allows SQL code abstract syntax trees to be published in RDF.
created: 2013-12-09
modified: 2014-01-28
license: http://creativecommons.org/licenses/by/1.0/
creator: Corentin Follenfant
creator: Olivier Corby
preferred namespace prefix: sql

Generic AST Node
type: Class
comment: Abstract class subsumed by all AST node classes.

Predicate
type: Class
comment: Represents a collection of one or more expressions or subqueries, that may be combined with logical operators, and when evaluated returns one of the TRUE / FALSE / UNKNOWN truth values.
subclass of: Generic AST Node

Join Predicate
type: Class
comment: Binary predicate used join two or more tables.
subclass of: Predicate

Cross Join Predicate
type: Class
comment: Join predicate used to perform the cross-product of two tables.
subclass of: Join Predicate

Inner Join Predicate
type: Class
subclass of: Join Predicate

Outer Join Predicate
type: Class
subclass of: Join Predicate

Right Outer Join Predicate
type: Class
subclass of: Outer Join Predicate

Left Outer Join Predicate
type: Class
subclass of: Outer Join Predicate

Full Outer Join Predicate
type: Class
subclass of: Outer Join Predicate

Is Null predicate
type: Class
comment: Unary predicate that compares the evaluated expression's value with NULL
subclass of: Predicate

Range predicate
type: Class
comment: Ternary predicate used to assert whether a provided expression's value is within the range specified by two other expressions' values.
subclass of: Predicate

In predicate
type: Class
comment: Variadic predicate used to assert whether the first provided expression's value is within the set of following provided expressions' values.
subclass of: Predicate

Exists predicate
type: Class
comment: Unary predicate that returns one of the TRUE or FALSE truth values depending on whether the evaluated subquery returns an empty result set.
subclass of: Predicate

Like predicate
type: Class
comment: Binary predicate that returns one of the TRUE or FALSE truth values depending on whether the string resulting in the evaluation of the first expression matches the lightweight regular expression described in the second expression.
subclass of: Predicate

Operator
type: Class
comment: A SQL operator used to perform arithmetic calculations, comparisons or value assignments.
subclass of: Generic AST Node

Alias
type: Class
comment: The SQL AS operator used to give an identifier to an expression.
subclass of: Operator

All
type: Class
comment: The SQL '*' wildcard operator, substitutes to all the columns of the tables in the FROM clause.
subclass of: Operator

Arithmetic Operator
type: Class
comment: A SQL arithmetic operator used to perform arithmetic calculation.
subclass of: Operator

Negation
type: Class
comment: A unary arithmetic operator used to produce the negative of its operand.
subclass of: Arithmetic Operator

Addition
type: Class
subclass of: Arithmetic Operator

Subtraction
type: Class
subclass of: Arithmetic Operator

Multiplication
type: Class
subclass of: Arithmetic Operator

Division
type: Class
subclass of: Arithmetic Operator

Comparison Operator
type: Class
comment: A binary operator used to compare two values, and when evaluated returns one of the TRUE / FALSE / UNKNOWN truth values.
subclass of: Operator

Greater than comparison
type: Class
subclass of: Comparison Operator

Less than comparison
type: Class
subclass of: Comparison Operator

Equality comparison
type: Class
subclass of: Comparison Operator

Difference comparison
type: Class
subclass of: Comparison Operator

Greater than or equal to comparison
type: Class
subclass of: Comparison Operator

Less than or equal to comparison
type: Class
subclass of: Comparison Operator

Logical Operator
type: Class
comment: A SQL logical connective used to perform logical calculation.
subclass of: Operator

Logical Conjunction
type: Class
subclass of: Logical Operator

Logical Disjunction
type: Class
subclass of: Logical Operator

Logical Negation
type: Class
comment: A SQL logical negation that can be used to negate any condition.
subclass of: Logical Operator

Set Operator
type: Class
comment: A SQL set operator used to perform set operation on the results of two or more queries.
subclass of: Operator

Union
type: Class
comment: A SQL union operator used to return the combination of the result sets of two or more queries.
subclass of: Set Operator

Union All
type: Class
comment: A SQL union operator used to return the combination of the result sets of two or more queries, including duplicate result rows.
subclass of: Set Operator

Intersection
type: Class
comment: A SQL intersection operator used to return the common result rows of the combination of the result sets of two or more queries.
subclass of: Set Operator

Exclusion
type: Class
comment: A SQL exclusion operator used to return the result set produced by removing the result rows of the second query that appear in the result set of the first query.
subclass of: Set Operator

String Operator
type: Class
subclass of: Operator

Concatenation
type: Class
comment: A SQL concatenation operator that returns the combination of two strings, expressions or values.
subclass of: String Operator

Expression
type: Class
comment: A SQL expression denotes any clause that when evaluated returns values.
subclass of: Generic AST Node

Case Expression
type: Class
comment: A SQL case expression enables the use of the IF <condition> THEN <consequent> ELSE <alternative> logic within SQL statements.
subclass of: Expression

Function Expression
type: Class
comment: A SQL function expressions consists in the use of any built-in SQL function.
subclass of: Expression

Aggregation Expression
type: Class
comment: A SQL aggregation expression consists in the use of an aggregate function.
subclass of: Expression

Function
type: Class
comment: A SQL built-in function that performs calculation and returns a value. May be vendor-specific.
subclass of: Generic AST Node

Scalar Function
type: Class
comment: A SQL scalar function returns a single value given the input values. The input value is of a SQL primitive data type.
subclass of: Function

Aggregate Function
type: Class
comment: A SQL aggregate function returns a single value given the values of multiple rows from a column.
subclass of: Function

Sum
type: Class
comment: The SQL aggregate function that returns the sum of the given expression.
subclass of: Aggregate Function

Average
type: Class
comment: The SQL aggregate function that returns the mean of the given expression.
subclass of: Aggregate Function

Count
type: Class
comment: The SQL aggregate function that returns the number of rows or non NULL values from the result set.
subclass of: Aggregate Function

Minimum
type: Class
comment: The SQL aggregate function that returns the minimum value of the given expression.
subclass of: Aggregate Function

Maximum
type: Class
comment: The SQL aggregate function that returns the maximum value of the given expression.
subclass of: Aggregate Function

Variance
type: Class
comment: The SQL aggregate function that returns the variance of the given expression.
subclass of: Aggregate Function

Standard Deviation
type: Class
comment: The SQL aggregate function that returns the standard deviation (square root of the variance) of the given expression.
subclass of: Aggregate Function

Data Type Conversion Function
type: Class
comment: A SQL scalar function.
subclass of: Scalar Function

Cast
type: Class
comment: A SQL scalar function that converts an expression to a target data type
subclass of: Data Type Conversion Function

Date Time Computation Function
type: Class
comment: A SQL date time function returns a date or time value or performs a specific date or time value computation.
subclass of: Scalar Function

Now
type: Class
comment: A SQL now function is a nullary function that returns the current timestamp.
subclass of: Date Time Computation Function

Table Function
type: Class
comment: A SQL function that returns a virtual table.
subclass of: Function

Number Function
type: Class
comment: A SQL number function that returns a numeric value and reads numeric values or string with numeric characters.
subclass of: Scalar Function

Statement
type: Class
comment: A SQL statement.
subclass of: Generic AST Node

Data Definition Statement
type: Class
comment: A SQL data definition statement.
subclass of: Statement

Data Manipulation Statement
type: Class
comment: A SQL data manipulation statement.
subclass of: Statement

Procedural Statement
type: Class
comment: A SQL procedural statement.
subclass of: Statement

Transaction Management Statement
type: Class
comment: A SQL transaction management statement.
subclass of: Statement

Session Management Statement
type: Class
comment: A SQL session management statement.
subclass of: Statement

Access Control Statement
type: Class
comment: A SQL access control statement.
subclass of: Statement

Import / Export Statement
type: Class
comment: A SQL import or export statement.
subclass of: Statement

Alter Statement
type: Class
comment: A SQL ALTER statement.
subclass of: Data Definition Statement

Create Statement
type: Class
comment: A SQL CREATE statement.
subclass of: Data Definition Statement

Drop Statement
type: Class
comment: A SQL DROP statement.
subclass of: Data Definition Statement

Select Statement
type: Class
comment: A SQL SELECT statement.
subclass of: Data Manipulation Statement

Insert Statement
type: Class
comment: A SQL INSERT statement.
subclass of: Data Manipulation Statement

Delete Statement
type: Class
comment: A SQL DELETE statement.
subclass of: Data Manipulation Statement

Update Statement
type: Class
comment: A SQL UPDATE statement.
subclass of: Data Manipulation Statement

Call Statement
type: Class
comment: A SQL CALL statement.
subclass of: Procedural Statement

Commit Statement
type: Class
comment: A SQL COMMIT statement.
subclass of: Transaction Management Statement

Rollback Statement
type: Class
comment: A SQL ROLLBACK statement.
subclass of: Transaction Management Statement

Lock Table Statement
type: Class
comment: A SQL LOCK TABLE statement.
subclass of: Transaction Management Statement

Connect Statement
type: Class
comment: A SQL CONNECT statement.
subclass of: Session Management Statement

Set Statement
type: Class
comment: Assigns a value to a session variable identifier.
subclass of: Session Management Statement

Grant Statement
type: Class
comment: A SQL GRANT statement used to give a set of privileges or roles to specified users that are actionable on specified database objects.
subclass of: Access Control Statement

Revoke Statement
type: Class
comment: A SQL REVOKE statement used to revoke a set of privileges or roles to specified users from specified database objects.
subclass of: Access Control Statement

AST Node Arguments
type: Property
comment: The generic predicate used to attach an ordered list of children to any AST node.
domain: Generic AST Node
range: List

Clause
type: Property
comment: A SQL clause is a part of a statement.
domain: Statement
range: Generic AST Node

SELECT clause
type: Property
comment: The SQL clause that specifies the projected tables of a SELECT statement.
domain: Select Statement
sub property of: Clause

FROM clause
type: Property
comment: The SQL clause that specifies the target sources (tables, views, subqueries) of a SELECT statement.
range: List
sub property of: Clause

WHERE clause
type: Property
comment: The SQL clause that specifies the filtering predicates to apply on the inputs of the FROM clause.
sub property of: Clause

GROUP BY clause
type: Property
comment: The SQL clause that specifies the columns whose values will be considered to cluster the result set of selected rows.
domain: Select Statement
sub property of: Clause

HAVING clause
type: Property
comment: The SQL clause that specifies the filtering predicates to apply on the clustered result set resulting of a GROUP BY clause.
domain: Select Statement
sub property of: Clause

ORDER BY clause
type: Property
comment: The SQL clause that specifies how to order the result set's records according to given expressions.
domain: Select Statement
sub property of: Clause

LIMIT clause
type: Property
comment: The SQL clause that limits the number of records from the result set that should be returned.
domain: Select Statement
range: integer
sub property of: Clause

INTO target table clause
type: Property
comment: The SQL clause that specifies into which table the following values or select statement's result set are to be inserted into.
range: Relational Table
sub property of: Clause

VALUES list Clause
type: Property
comment: The SQL clause that specifies a list of values or expressions evaluating to values.
domain: Insert Statement
range: List
sub property of: Clause

Database Catalog Object
type: Class
comment: A database catalog object reference.
subclass of: Generic AST Node

Relational Schema
type: Class
comment: A reference or declarative statement for a catalog schema.
subclass of: Database Catalog Object

Relational Table
type: Class
comment: A reference or declarative statement for a catalog table.
subclass of: Database Catalog Object

Relational Column
type: Class
comment: A reference or declarative statement for a catalog column.
subclass of: Database Catalog Object

Relational Index
type: Class
comment: A reference or declarative statement for a catalog index.
subclass of: Database Catalog Object

Relational Procedure
type: Class
comment: A reference or declarative statement for a catalog procedure.
subclass of: Database Catalog Object

Relational User
type: Class
comment: A reference or declarative statement for a catalog user.
subclass of: Database Catalog Object

Relational Role
type: Class
comment: A reference or declarative statement for a catalog role.
subclass of: Database Catalog Object

Relational View
type: Class
comment: A reference or declarative statement for a catalog view.
subclass of: Database Catalog Object

Relational Sequence
type: Class
comment: A reference or declarative statement for a catalog sequence.
subclass of: Database Catalog Object

Database Catalog Object Identifier
type: Class
comment: A database catalog object identifier, qualified or not.
subclass of: Generic AST Node

Schema Identifier
type: Class
comment: A valid identifier for a catalog schema.
subclass of: Database Catalog Object Identifier

Table Identifier
type: Class
comment: A valid identifier for a catalog table.
subclass of: Database Catalog Object Identifier

Column Identifier
type: Class
comment: A valid identifier for a catalog column.
subclass of: Database Catalog Object Identifier

Index Identifier
type: Class
comment: A valid identifier for a catalog index.
subclass of: Database Catalog Object Identifier

Procedure Identifier
type: Class
comment: A valid identifier for a catalog procedure.
subclass of: Database Catalog Object Identifier

User Identifier
type: Class
comment: A valid identifier for a catalog user.
subclass of: Database Catalog Object Identifier

Role Identifier
type: Class
comment: A valid identifier for a catalog role.
subclass of: Database Catalog Object Identifier

View Identifier
type: Class
comment: A valid identifier for a catalog view.
subclass of: Database Catalog Object Identifier

Identifier
type: Class
comment: A valid identifier for a catalog sequence.
subclass of: Database Catalog Object Identifier