SQL Abstract Syntax Trees Vocabulary

Namespace Documentation 28 January 2014

Latest version:
http://ns.inria.fr/ast/sql/ (ttl, rdf)
Current version:
0.3
Status:
Unstable
Authors:
Corentin Follenfant (INRIA, Wimmics)
Olivier Corby (INRIA, Wimmics)
IRI:
http://ns.inria.fr/ast/sql

Creative Commons License This work is licensed under a Creative Commons Attribution License 1.0 Generic License. This copyright applies to the SQL AST Vocabulary Specification in Turtle and RDF/XML, and to the present documentation.

The SQL AST Vocabulary complies with W3C's RDF 1.1 and RDFS 1.1 recommendations.


Abstract

The SQL AST Vocabulary allows SQL code abstract syntax trees to be published in RDF.

Table of Contents

  1. Introduction
  2. Description
  3. Examples
  4. Classes
  5. Properties
  6. Namespace Declarations
  7. References

Introduction back to ToC

As relational databases remain widespread in enterprise systems, most business intelligence and data analytics software make large use of SQL [SQL2] to query and manipulate their content in a deterministic and efficient manner, and use the result sets to populate dynamic documents such as visualizations or infographics. While such documents remain disparate from a system to another, they often share the use of (vendor-specific dialects of) SQL, which provides a formal ground for edition, comparison or retrieval of the documents, provided the queries are modelled with a richer representation than their textual serialization.

Abstract syntax trees allow to build structured representations of code for any language with a grammar: AST nodes carrying labels can stand for keywords, objects, variables, constants or any language element while the tree structure allows to abstract away the language's concepts of scope or dependency. ASTs are a machine-readable format for concrete syntax code, and can be decorated with implicit or contextual knowledge from the grammar. We hereby propose to model ASTs with RDF graphs. AST structures naturally fit RDF graphs: nodes map resources, node labels map resources' types, and grammar knowledge map to vocabulary's semantics, e.g. with subsumption.

With this vocabulary, we take the case of modeling SQL ASTs, largely inspired by the SPIN work which represents SPARQL queries in RDF [SPIN]. We propose a toolbox of RDF solutions to represent SQL queries with a concision requirement in order to ensure the conveniency of these ASTs'' manipulation with SPARQL (edition, comparison or retrieval). Therefore we focus on Turtle serialization [TURTLE] of the ASTs, as it is close to SPARQL triple pattern syntax. We build an ontological view for a subset of the most widely used SQL constructs, and leave extensions to dialects specialists who can extend it according to their SQL vendor-specific features (e.g. built-in functions), according to the web of data reusability best practices.

Description back to ToC

Note

In vocabulary outline diagrams, black arrows Black arrow represent rdfs:subClassOf relationships between classes, white arrows White arrow represent rdfs:subPropertyOf relationships between properties, and empty arrows Spec arrow represent other properties as specified with their labels. The recommended prefix for this vocabulary is sql:, unless otherwise specified it is assumed as the default prefix in outline diagrams.

All AST nodes are typed with one of the language's abstract classes that are further detailed below. The default way to represent an AST node's children is by using the generic property sql:args and an grouping them into an rdf:List collection to enforce children ordering.

Root subvocabulary at a glance

SQL statement classes represent the different types of instructions that can be communicated as queries to a RDB. This vocabulary essentially focuses on SELECT data manipulation statements which are most commonly found in data analytics use cases.

Statements subvocabulary at a glance

SQL statement are segmented in clauses, which are represented with properties. These are all subproperties of sql:clause. Some of the clauses are bound to specific statements, which is represented with their property's rdfs:domain. Other clauses are generic an can be used in different types of statements. For instance, the FROM clause can be found in SELECT and DELETE statements, its content, and therefore its abstract syntax subtree, differs accordingly. When a single type of object can be found in a clause, the rdfs:range of its property is specified (with LIMIT, INTO and VALUES clauses). Other clauses have no domain nor range.

Clauses subvocabulary at a glance

SQL predicates are expressions or sets of expressions combined with logical operators, and are evaluated as booleans that are used in WHERE and HAVING clauses and FROM's clauses join conditions.

Predicates subvocabulary at a glance

SQL expressions combine symbols, literals and operators and evaluate to values. In an AST, the expression concept is often omitted and is represented by its highest-precedence operator or function, or sequences of value objects.

Expressions subvocabulary at a glance

SQL operators are symbols that translate to an action to be performed on one or more expressions, and also include wildcards as nullary operators whose evaluation depend on the local statement context.

Operators subvocabulary at a glance

SQL functions are the most vendor-specific part of SQL, hence we provide only the generic aggregation functions, and abstract classes that characterize functions depending on the data types they handle or return.

Functions subvocabulary at a glance

Finally, we give a list of catalog objects that can be manipulated in queries, by referencing them with their identifiers. These identifiers can be qualified ones, e.g. the "name" column from the "customers" table from the "operations" schema is referred to in SQL using the membership operator '.', resulting in operations.customers.name being its qualified identifier. This translates to Turtle as:

identifier Example (turtle)
[ a sql:ColumnIdentifier ; sql:args (
   [ a sql:Schema ; rdfs:label "operations" ]
   [ a sql:Table ; rdfs:label "customers" ]
   [ a sql:Column ; rdfs:label "name" ] ) ]

Hence, the catalog objects classes below are merely used to type the blank nodes that bear the unqualified names of objects as their rdfs:labels. Each type of catalog object also has a corresponding identifier class which is a subclass of sql:ObjectIdentifier, it can then be added any number of unqualified raw catalog object nodes (in the above example, three).

Catalog objects subvocabulary at a glance

Examples back to ToC

These examples show how to model given SQL queries using the RDFS vocabulary hereby specified. Each example presents the source SQL code and its target RDF representation with the Turtle format. Original queries are adapted from those generated by the TPC-DC benchmark query generator [TPCDS].

This first example shows a simple query often used in SQL tutorials. It queries a table called "Cutomers" by selecting all its columns. The root blank node refers to the SELECT statement, which is described with two triples for its two clauses, the first one being the projection clause labeled as "SELECT" and the second one being the FROM one. Here the table identifier is not qualified, so its single argument is the table name.

Example 1 (SQL)
SELECT * FROM customers;
Example 1 (Turtle)
@prefix sql: <http://ns.inria.fr/ast/sql#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

[ a sql:Select ; sql:select ( [ a sql:All ] ) ;
                 sql:from (
                    [ a sql:TableIdentifier ; sql:args ( [ a sql:Table ; rdfs:label "customers" ] ) ]
                 ) ] .

This second example shows the generic use of sql:args predicate to specify any AST node's children, and longer lists of elements. Literals used in the query are represented as (eventually abbreviated) datatyped literals, according to the mapping of SQL types with RDF literals proposed in the R2RML recommendation [R2RML]. A sequence of identical yet independant operators, such as several conjunctions of predicate expressions in a WHERE clause, is factorized into a unique blank node which gets all the conditions as arguments.

Example 2 (SQL)
SELECT
   l_orderkey,
   sum( l_extendedprice * ( 1 - l_discount) ) AS revenue,
   o_orderdate,
   o_shippriority
FROM
   customer,
   orders,
   lineitem
WHERE
  c_mktsegment = 'FURNITURE' AND
  c_custkey = o_custkey AND
  l_orderkey = o_orderkey AND
  o_orderdate < 2013-12-21 AND
  l_shipdate > date 2014-01-06
GROUP BY
  l_orderkey,
  o_orderdate,
  o_shippriority
ORDER BY
  revenue,
  o_orderdate;
Example 2 (Turtle)
@prefix sql: <http://ns.inria.fr/ast/sql#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[ a sql:Select ; sql:select (    
    [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "L_ORDERKEY" ] ) ]
    [ a sql:Alias ; rdfs:label "REVENUE" ; sql:args (
      [ a sql:Sum ; sql:args (
         [ a sql:Times ; sql:args (
          [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "L_EXTENDEDPRICE" ] ) ]
          [ a sql:Minus ; sql:args ( 1 [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "L_DISCOUNT" ] ) ] ) ]
         ) ] ) ] ) ]    
    [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_ORDERDATE" ] ) ]
    [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_SHIPPRIORITY" ] ) ]
) ; sql:from (    
 [ a sql:TableIdentifier ; sql:args ( [ a sql:Table ; rdfs:label "CUSTOMER" ] ) ]
 [ a sql:TableIdentifier ; sql:args ( [ a sql:Table ; rdfs:label "ORDER" ] ) ]
 [ a sql:TableIdentifier ; sql:args ( [ a sql:Table ; rdfs:label "LINEITEM" ] ) ]
) ; sql:where (
 [ a sql:And ; sql:args (
  [ a sql:Equals ; sql:args (
   [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "C_MKTSEGMENT" ] ) ]
   "FURNITURE" ) ]
  [ a sql:Equals ; sql:args (
   [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "C_CUSTKEY" ] ) ]
   [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_CUSTKEY" ] ) ] ) ]
  [ a sql:Equals ; sql:args (
   [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "L_ORDERKEY" ] ) ]
   [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_ORDERKEY" ] ) ] ) ]
  [ a sql:LessThan ; sql:args (
   [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_ORDERDATE" ] ) ]
   "2013-12-21"^^xsd:date ) ]
  [ a sql:GreaterThan ; sql:args (
   [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "L_SHIPDATE" ] ) ]
   "2014-01-06"^^xsd:date ) ] ) ]
) ; sql:groupBy (
 [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "L_ORDERKEY" ] ) ]
 [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_ORDERDATE" ] ) ]
 [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_SHIPPRIORITY" ] ) ]
) ; sql:orderBy (
 [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "REVENUE" ] ) ]
 [ a sql:ColumnIdentifier ; sql:args ( [ a sql:Column ; rdfs:label "O_ORDERDATE" ] ) ] ) ] .

Classes back to ToC

Access Control Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#AccessControlStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL access control statement.

has super-classes
Statementc
has sub-classes
Grant Statementc, Revoke Statementc

Additionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Plus

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Arithmetic Operatorc

Aggregate Functionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#AggregateFunction

is defined by
http://ns.inria.fr/ast/sql

A SQL aggregate function returns a single value given the values of multiple rows from a column.

has super-classes
Functionc
has sub-classes
Averagec, Countc, Maximumc, Minimumc, Standard Deviationc, Sumc, Variancec

Aggregation Expressionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#AggregationExpression

is defined by
http://ns.inria.fr/ast/sql

A SQL aggregation expression consists in the use of an aggregate function.

has super-classes
Expressionc

Aliasc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Alias

is defined by
http://ns.inria.fr/ast/sql

The SQL AS operator used to give an identifier to an expression.

has super-classes
Operatorc

Allc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#All

is defined by
http://ns.inria.fr/ast/sql

The SQL '*' wildcard operator, substitutes to all the columns of the tables in the FROM clause.

has super-classes
Operatorc

Alter Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#AlterStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL ALTER statement.

has super-classes
Data Definition Statementc

Arithmetic Operatorc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ArithmeticOperator

is defined by
http://ns.inria.fr/ast/sql

A SQL arithmetic operator used to perform arithmetic calculation.

has super-classes
Operatorc
has sub-classes
Additionc, Divisionc, Multiplicationc, Negationc, Subtractionc

Averagec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Avg

is defined by
http://ns.inria.fr/ast/sql

The SQL aggregate function that returns the mean of the given expression.

has super-classes
Aggregate Functionc

Functionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Function

is defined by
http://ns.inria.fr/ast/sql

A SQL built-in function that performs calculation and returns a value. May be vendor-specific.

has super-classes
Generic AST Nodec
has sub-classes
Aggregate Functionc, Table Functionc, Scalar Functionc

Call Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#CallStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL CALL statement.

has super-classes
Procedural Statementc

Case Expressionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#CaseExpression

is defined by
http://ns.inria.fr/ast/sql

A SQL case expression enables the use of the IF <condition> THEN <consequent> ELSE <alternative> logic within SQL statements.

has super-classes
Expressionc

Castc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Cast

is defined by
http://ns.inria.fr/ast/sql

A SQL scalar function that converts an expression to a target data type

has super-classes
Data Type Conversion Functionc

Commit Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#CommitStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL COMMIT statement.

has super-classes
Transaction Management Statementc

Comparison Operatorc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ComparisonOperator

is defined by
http://ns.inria.fr/ast/sql

A binary operator used to compare two values, and when evaluated returns one of the TRUE / FALSE / UNKNOWN truth values.

has super-classes
Operatorc
has sub-classes
Difference comparisonc, Equality comparisonc, Greater than comparisonc, Greater than or equal to comparisonc, Less than comparisonc, Less than or equal to comparisonc

Concatenationc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Concatenation

is defined by
http://ns.inria.fr/ast/sql

A SQL concatenation operator that returns the combination of two strings, expressions or values.

has super-classes
String Operatorc

Connect Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ConnectStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL CONNECT statement.

has super-classes
Session Management Statementc

Countc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Count

is defined by
http://ns.inria.fr/ast/sql

The SQL aggregate function that returns the number of rows or non NULL values from the result set.

has super-classes
Aggregate Functionc

Create Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#CreateStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL CREATE statement.

has super-classes
Data Definition Statementc

Cross Join Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#CrossJoin

is defined by
http://ns.inria.fr/ast/sql

Join predicate used to perform the cross-product of two tables.

has super-classes
Join Predicatec

Data Definition Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#DataDefinitionStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL data definition statement.

has super-classes
Statementc
has sub-classes
Create Statementc, Drop Statementc, Update Statementc

Data Manipulation Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#DataManipulationStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL data manipulation statement.

has super-classes
Statementc
has sub-classes
Delete Statementc, Insert Statementc, Select Statementc, Update Statementc

Data Type Conversion Functionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#DataTypeConversionFunction

is defined by
http://ns.inria.fr/ast/sql

A SQL scalar function.

has super-classes
Scalar Functionc
has sub-classes
Castc

Database Catalog Objectc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#CatalogObject

is defined by
http://ns.inria.fr/ast/sql

A database catalog object refernce, identified with delimited identifiers listed as separated arguments.

has super-classes
Generic AST Nodec
has sub-classes
Relational Indexc, Relational Procedurec, Relational Rolec, Relational Schemac, Relational Sequencec, Relational Tablec, Relational Tablec, Relational Userc, Relational Viewc

Date Time Computation Functionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#DateTimeFunction

is defined by
http://ns.inria.fr/ast/sql

A SQL date time function returns a date or time value or performs a specific date or time value computation.

has super-classes
Scalar Functionc
has sub-classes
Nowc

Delete Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#DeleteStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL DELETE statement.

has super-classes
Data Manipulation Statementc

Difference comparisonc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#NotEquals

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Comparison Operatorc

Divisionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Div

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Arithmetic Operatorc

Drop Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#DropStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL DROP statement.

has super-classes
Data Definition Statementc

Equality comparisonc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Equals

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Comparison Operatorc

Exclusionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Except

is defined by
http://ns.inria.fr/ast/sql

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.

has super-classes
Set Operatorc

Exists predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Exists

is defined by
http://ns.inria.fr/ast/sql

Unary predicate that returns one of the TRUE or FALSE truth values depending on whether the evaluated subquery returns an empty result set.

has super-classes
Predicatec

Expressionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Expression

is defined by
http://ns.inria.fr/ast/sql

A SQL expression denotes any clause that when evaluated returns values.

has super-classes
Generic AST Nodec
has sub-classes
Aggregation Expressionc, Case Expressionc, Function Expressionc

Full Outer Join Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#FullOuterJoin

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Outer Join Predicatec

Function Expressionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#FunctionExpression

is defined by
http://ns.inria.fr/ast/sql

A SQL function expressions consists in the use of any built-in SQL function.

has super-classes
Expressionc

Generic AST Nodec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ASTNode

is defined by
http://ns.inria.fr/ast/sql

Abstract class subsumed by all AST node classes.

has sub-classes
Functionc, Database Catalog Objectc, Object Identifierc, Expressionc, Operatorc, Predicatec, Statementc
is in domain of
AST Node Argumentsap

Grant Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Grant

is defined by
http://ns.inria.fr/ast/sql

A SQL GRANT statement used to give a set of privileges or roles to specified users that are actionable on specified database objects.

has super-classes
Access Control Statementc

Greater than comparisonc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#GreaterThan

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Comparison Operatorc

Greater than or equal to comparisonc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#GreaterEquals

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Comparison Operatorc

Import / Export Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#IOStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL import or export statement.

has super-classes
Statementc

In predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#In

is defined by
http://ns.inria.fr/ast/sql

Variadic predicate used to assert whether the first provided expression's value is within the set of following provided expressions' values.

has super-classes
Predicatec

Inner Join Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#InnerJoin

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Join Predicatec

Insert Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#InsertStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL INSERT statement.

has super-classes
Data Manipulation Statementc
is in domain of
VALUES list Clauseop

Intersectionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Intersect

is defined by
http://ns.inria.fr/ast/sql

A SQL intersection operator used to return the common result rows of the combination of the result sets of two or more queries.

has super-classes
Set Operatorc

Is Null predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#IsNull

is defined by
http://ns.inria.fr/ast/sql

Unary predicate that compares the evaluated expression's value with NULL

has super-classes
Predicatec

Join Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#JoinPredicate

is defined by
http://ns.inria.fr/ast/sql

Binary predicate used join two or more tables.

has super-classes
Predicatec
has sub-classes
Cross Join Predicatec, Inner Join Predicatec, Outer Join Predicatec

Left Outer Join Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#LeftOuterJoin

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Outer Join Predicatec

Less than comparisonc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#LessThan

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Comparison Operatorc

Less than or equal to comparisonc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#LessEquals

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Comparison Operatorc

Like predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Like

is defined by
http://ns.inria.fr/ast/sql

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.

has super-classes
Predicatec

Lock Table Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#LockTableStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL LOCK TABLE statement.

has super-classes
Transaction Management Statementc

Logical Conjunctionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#And

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Logical Operatorc

Object Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ObjectIdentifier

is defined by
http://ns.inria.fr/ast/sql

A database catalog object identifier, qualified or not.

has super-classes
Generic AST Nodec
has sub-classes
Index Identifierc, Procedure Identifierc, Role Identifierc, Schema Identifierc, Sequence Identifierc, Column Identifierc, Table Identifierc, User Identifierc, View Identifierc

Logical Disjunctionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Or

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Logical Operatorc

Logical Negationc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Not

is defined by
http://ns.inria.fr/ast/sql

A SQL logical negation that can be used to negate any condition.

has super-classes
Logical Operatorc

Logical Operatorc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#LogicalOperator

is defined by
http://ns.inria.fr/ast/sql

A SQL logical connective used to perform logical calculation.

has super-classes
Operatorc
has sub-classes
Logical Conjunctionc, Logical Disjunctionc, Logical Negationc

Maximumc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Max

is defined by
http://ns.inria.fr/ast/sql

The SQL aggregate function that returns the maximum value of the given expression.

has super-classes
Aggregate Functionc

Minimumc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Min

is defined by
http://ns.inria.fr/ast/sql

The SQL aggregate function that returns the minimum value of the given expression.

has super-classes
Aggregate Functionc

Multiplicationc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Mult

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Arithmetic Operatorc

Negationc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Negate

is defined by
http://ns.inria.fr/ast/sql

A unary arithmetic operator used to produce the negative of its operand.

has super-classes
Arithmetic Operatorc

Nowc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Now

is defined by
http://ns.inria.fr/ast/sql

A SQL now function is a nullary function that returns the current timestamp.

has super-classes
Date Time Computation Functionc

Number Functionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#NumberFunction

is defined by
http://ns.inria.fr/ast/sql

A SQL number function that returns a numeric value and reads numeric values or string with numeric characters.

has super-classes
Scalar Functionc

Operatorc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Operator

is defined by
http://ns.inria.fr/ast/sql

A SQL operator used to perform arithmetic calculations, comparisons or value assignments.

has super-classes
Generic AST Nodec
has sub-classes
Allc, Arithmetic Operatorc, Comparison Operatorc, Logical Operatorc, Set Operatorc, String Operatorc

Outer Join Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#OuterJoin

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Join Predicatec
has sub-classes
Full Outer Join Predicatec, Left Outer Join Predicatec, Right Outer Join Predicatec

Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Predicate

is defined by
http://ns.inria.fr/ast/sql

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.

has super-classes
Generic AST Nodec
has sub-classes
Exists predicatec, In predicatec, Is Null predicatec, Join Predicatec, Like predicatec, Range predicatec

Procedural Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ProceduralStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL procedural statement.

has super-classes
Statementc
has sub-classes
Call Statementc

Range predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Between

is defined by
http://ns.inria.fr/ast/sql

Ternary predicate used to assert whether a provided expression's value is within the range specified by two other expressions' values.

has super-classes
Predicatec

Relational Indexc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Index

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog index.

has super-classes
Database Catalog Objectc

Index Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#IndexIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog index.

has super-classes
Object Identifierc

Relational Procedurec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Procedure

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog procedure.

has super-classes
Database Catalog Objectc

Procedure Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ProcedureIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog procedure.

has super-classes
Object Identifierc

Relational Rolec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Role

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog role.

has super-classes
Database Catalog Objectc

Role Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#RoleIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog role.

has super-classes
Object Identifierc

Relational Schemac back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Schema

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog schema.

has super-classes
Database Catalog Objectc

Schema Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#SchemaIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog schema.

has super-classes
Object Identifierc

Relational Sequencec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Sequence

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog sequence.

has super-classes
Database Catalog Objectc

Sequence Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#SequenceIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog sequence.

has super-classes
Object Identifierc

Relational Columnc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Column

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog column.

has super-classes
Database Catalog Objectc

Column Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ColumnIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog column.

has super-classes
Object Identifierc

Relational Tablec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Table

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog table.

has super-classes
Database Catalog Objectc
is in range of
INTO target table clauseap

Table Identifier c back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#TableIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog table.

has super-classes
Object Identifierc

Relational Userc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#User

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog user.

has super-classes
Database Catalog Objectc

UserIdentifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#UserIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog user.

has super-classes
Object Identifierc

Relational Viewc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#View

is defined by
http://ns.inria.fr/ast/sql

A SQL reference or declarative statement for a catalog view.

has super-classes
Database Catalog Objectc

View Identifierc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ViewIdentifier

is defined by
http://ns.inria.fr/ast/sql

A valid identifier for a catalog view.

has super-classes
Object Identifierc

Revoke Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Revoke

is defined by
http://ns.inria.fr/ast/sql

A SQL REVOKE statement used to revoke a set of privileges or roles to specified users from specified database objects.

has super-classes
Access Control Statementc

Right Outer Join Predicatec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#RightOuterJoin

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Outer Join Predicatec

Rollback Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#RollbackStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL ROLLBACK statement.

has super-classes
Transaction Management Statementc

Scalar Functionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#ScalarFunction

is defined by
http://ns.inria.fr/ast/sql

A SQL scalar function returns a single value given the input values. The input value is of a SQL primitive data type.

has super-classes
Functionc
has sub-classes
Data Type Conversion Functionc, Date Time Computation Functionc, Number Functionc

Select Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#SelectStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL SELECT statement.

has super-classes
Data Manipulation Statementc
is in domain of
GROUP BY clauseap, HAVING clauseap, LIMIT clauseap, ORDER BY clauseap, SELECT clauseap

Session Management Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#SessionManagementStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL session management statement.

has super-classes
Statementc
has sub-classes
Connect Statementc, Set Statementc

Set Operatorc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#SetOperator

is defined by
http://ns.inria.fr/ast/sql

A SQL set operator used to perform set operation on the results of two or more queries.

has super-classes
Operatorc
has sub-classes
Exclusionc, Intersectionc, Unionc, Union Allc

Set Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#SetStatement

is defined by
http://ns.inria.fr/ast/sql

Assigns a value to a session variable identifier.

has super-classes
Session Management Statementc

Standard Deviationc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#StdDev

is defined by
http://ns.inria.fr/ast/sql

The SQL aggregate function that returns the standard deviation (square root of the variance) of the given expression.

has super-classes
Aggregate Functionc

Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Statement

is defined by
http://ns.inria.fr/ast/sql

A SQL statement.

has super-classes
Generic AST Nodec
has sub-classes
Access Control Statementc, Data Definition Statementc, Data Manipulation Statementc, Import / Export Statementc, Procedural Statementc, Session Management Statementc, Transaction Management Statementc
is in domain of
Clauseap

String Operatorc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#StringOperator

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Operatorc
has sub-classes
Concatenationc

Subtractionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Minus

is defined by
http://ns.inria.fr/ast/sql
has super-classes
Arithmetic Operatorc

Sumc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Sum

is defined by
http://ns.inria.fr/ast/sql

The SQL aggregate function that returns the sum of the given expression.

has super-classes
Aggregate Functionc

Table Functionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#TableFunction

is defined by
http://ns.inria.fr/ast/sql

A SQL function that returns a virtual table.

has super-classes
Functionc

Transaction Management Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#TransactionManagementStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL transaction management statement.

has super-classes
Statementc
has sub-classes
Commit Statementc, Lock Table Statementc, Rollback Statementc

Unionc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Union

is defined by
http://ns.inria.fr/ast/sql

A SQL union operator used to return the combination of the result sets of two or more queries.

has super-classes
Set Operatorc

Union Allc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#UnionAll

is defined by
http://ns.inria.fr/ast/sql

A SQL union operator used to return the combination of the result sets of two or more queries, including duplicate result rows.

has super-classes
Set Operatorc

Update Statementc back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#UpdateStatement

is defined by
http://ns.inria.fr/ast/sql

A SQL UPDATE statement.

has super-classes
Data Manipulation Statementc

Variancec back to ToC or Class ToC

IRI: http://ns.inria.fr/ast/sql#Var

is defined by
http://ns.inria.fr/ast/sql

The SQL aggregate function that returns the variance of the given expression.

has super-classes
Aggregate Functionc

Properties back to ToC

AST Node Argumentsap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#args

The generic predicate used to attach an ordered list of children to any AST node.

has domain
Generic AST Nodec

Clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#clause

is defined by
http://ns.inria.fr/ast/sql

A SQL clause is a part of a statement.

FROM clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#from

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies the target sources (tables, views, subqueries) of a SELECT statement.

has super-properties
Clauseap

GROUP BY clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#groupBy

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies the columns whose values will be considered to cluster the result set of selected rows.

has super-properties
Clauseap
has domain
Select Statementc

HAVING clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#having

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies the filtering predicates to apply on the clustered result set resulting of a GROUP BY clause.

has super-properties
Clauseap
has domain
Select Statementc

INTO target table clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#into

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies into which table the following values or select statement's result set are to be inserted into.

has super-properties
Clauseap
has range
Tablec

LIMIT clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#limit

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that limits the number of records from the result set that should be returned.

has super-properties
Clauseap
has domain
Select Statementc
has range
xsd:integer

ORDER BY clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#orderBy

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies how to order the result set's records according to given expressions.

has super-properties
Clauseap
has domain
Select Statementc

SELECT clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#select

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies the projected tables of a SELECT statement.

has super-properties
Clauseap
has domain
Select Statementc

VALUES list Clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#values

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies a list of values or expressions evaluating to values.

has super-properties
Clauseap
has domain
Insert Statementc

WHERE clauseap back to ToC or Property ToC

IRI: http://ns.inria.fr/ast/sql#where

is defined by
http://ns.inria.fr/ast/sql

The SQL clause that specifies the filtering predicates to apply on the inputs of the FROM clause.

has super-properties
Clauseap

Namespace Declarations back to ToC

default namespace
http://ns.inria.fr/ast/sql#
owl
http://www.w3.org/2002/07/owl#
rdf
http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs
http://www.w3.org/2000/01/rdf-schema#
sql
http://ns.inria.fr/ast/sql#
dcterms
http://purl.org/dc/terms/
vann
http://purl.org/vocab/vann/
xsd
http://www.w3.org/2001/XMLSchema#

References back to ToC

[R2RML]
Souripriya Das, Seema Sundara, Richard Cyganiak. R2RML: RDB to RDF Mapping Language. 27 September 2012. W3C Recommendation. Latest edition available at http://www.w3.org/TR/r2rml/.
[SPIN]
Holger Knublauch. SPIN - SPARQL Syntax. 12 September 2013. W3C Member Submission (work in progress). Latest edition available at http://spinrdf.org/sp.html.
[SQL2]
ISO/IEC 9075-2:2011 SQL - Part 2: Foundation (SQL/Foundation). International Organization for Standardization. 04 February 2013.
[TPCDS]
TPC Benchmark™ DS Standard Specification. Transaction Processing Performance Council. April 2012.
[TURTLE]
Eric Prud'hommeaux, Gavin Carothers. RDF 1.1 Turtle: Terse RDF Triple Language. 9 January 2014. W3C Proposed Recommendation (work in progress). Latest edition available at http://www.w3.org/TR/turtle/.

HTML layout adapted after processing of the RDFS vocabulary through LODE, Live OWL Documentation Environment.