XCDSQL Homepage: XML (en)Coded and Documented SQL - eXCeeDs Sequel Logo: <eXCeeDSeQueL>

XCDSQL Homepage

XML (en)Coded and Documented SQL - eXCeeDs Sequel
Keywords:
XML, SQL, platform-independant database programming
Authors:
R.P. Bouman <roland.bouman@xcdsql.org>

Abstract

This document introduces XCDSQL. XCDSQL is an abbreviation of XML (en)Coded and Documented SQL, and is pronounced as exceeds sequel. XCDSQL is a computer programming language that employs the semantics of Structured Query Language, (abbreviated SQL, and sometimes pronounced as sequel), and conforms syntactically to the Extensible Markup Language (abbreviated XML).

The primary goal of XCDSQL is to facilitate SQL-agents to formulate commands for multiple SQL-implementations. The secondary goal of XCDSQL is to encourage documentation of such commands.

Status of this document

This document is yet unreviewed. It may be considered as a announcement of the initial specification of XCDSQL. Feedback on this document is greatly appreciated, and may be submitted to feedback@xcdsql.org. Any errors found in this document may be reported to errors@xcdsql.org.


Table of Contents

1  Introduction
1.1  Origin and Goals
1.2  Definitions and Terminology
2  SQL
3  XML
4  SQL in XML: XCDSQL
A. DTD for XCDSQL (non-normative)

1 Introduction

XML(en)Coded and Documented SQL, abbreviated XCDSQL and pronounced as exceeds sequel, describes a class of XML-documents (XCDSQL-documents or XCDSQL-programs) that describe the definition and/or manipulation of objects, events and structures (database-objects) associated with and/or maintained by (relational) database management systems (RDBMS). An XCDSQL-document can be thought of as a computer program in the sense that the semantics of the definitions and/or manipulations of database-objects it describes, could be realized on an actual database management system, resulting in the actual definition and/or manipulation of corresponding and equivalent database-objects.

Presently, no (database) platform exists that is capable of interpreting or compiling XCDSQL-programs directly. Nor is one needed: XCDSQL-programs are primarily intended to be translated rather than executed. Translation is to result in some native or platform-dependant source-code (target-platform source-code), typically some SQL-dialect, that can be interpreted or compiled and then executed. Although XCDSQL is a language that is not intended to be interpreted or compiled directly, there are no inherent objections against constructing such a platform.

Because an XML-syntaxis is used to encode the SQL-semantics, building a program that translates XCDSQL into target-platform source-code supposes no more than the construction of a XSLT-stylesheet. The construction of a particular translation can be initiated in an ad-hoc manner whenever one is actually needed.

1.1 Origin and Goals

Although XCDSQL employs concepts defined in the ANSI/ISO/IEC International Standard (IS): Database Language SQL, and uses some of the keywords defined therein as element and attribute names, there is no formal connection between both languages; nor is there any formal relationship between the organizations involved in developing these languages. Although XCDSQL employs concepts defined in the W3C Recommendation Extensible Markup Language, and conforms to the syntaxis defined therein, there is no formal connection between both languages, other than that XCDSQL conforms to the XML-syntaxis; nor is there any formal relationship between the organizations involved in developing these languages. Although this document suggests employment of XSLT-technology to transform XCDSQL-programs into interpretable, compilable or executable, platform-dependant code, no formal relationship exists between XCDSQL and XSLT; nor is there any formal relationship between the organizations involved in developing these XML-applications. Although this document suggests employment of XSLT-technology as a means to transform XCDSQL-programs into some target-platform source-code, no objection is intended against any other means or technology of performing such transformations.

The design goals for XCDSQL are:

1.2 Definitions and Terminology

The terms and definitions that are used throughout this document are explained below.
DBMS
An application program that acts as a database management system, that is the software that maintains database-objects
database-object
Some data-structure or definition residing in and maintained by a DBMS
semantics
The total of the concepts, structures and manipulations belonging to a language
source-code
Some sequence of charactersymbols or -tokens that may be interpreted as a definition of, and possible transformed (e.g. interpreted or compiled) into, an executable program by some target-platform
SQL
Structured Query Language.
syntaxis
The total of rules that together describe the pattern of character-sequences that may be interpreted as an sentence belonging to the language of which it is a syntaxis
target-platform
Some application program that is capable of executing programs previously specified in some source-code.
XCDSQL
The XML-(en)Coded and Documented Structured Query Language; the programming language described in this document.
XCDSQL-document
A XML-document conforming to the syntaxis defined for the XCDSQL programming language, usully a XCDSQL-program.
XCDSQL-program
A computer program that is written in the XCDSQL-programming language.
XML
The Extensible Markup Language.

2 SQL

SQL originated as a language for working with relational databases. It is an abbreviation of Structured Query Language. Most relational database management systems implement some variant or of SQL, or so-called SQL-dialect. Although attempts have been made to achieve standardization, there is no RDBMS that implements the full range of constructs defined in the latest, or even the earlier specifications of the standard. It is beyond the scope of this document to present an overview of all SQL-dialects, or even the ANSI/ISO/IEC standards. Instead, reading of the Summary of SQL is recommended.

3 XML

XML is an application profile or restricted form of SGML, the Standard Generalized Markup Language [ISO 8879]. XML was developed by an XML Working Group formed under the auspices of the World Wide Web Consortium (W3C) in 1996. XML-syntaxis has proved to be successfully employable for various applications including data-formats (RDF,XTM), markup-languages (XHTML) or programming lanuages (XUL,XSLT). It is beyond the scope of this document to reflect upon the applicability, benefits and restrictions of XML

4 SQL in XML: XCDSQL


Appendices

A DTD for XCDSQL (non-normative)

The DTD for XCDSQL documents is given below. This DTD is to be considered as draft. It only serves to give a taste of how XCDSQL-programs will look like. The DTD is soon to be replaced by a XMLSchema.

<!--===========================================

Miscellaneous entities


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All data manipulation statements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ENTITY % db-ref.attrib " db NMTOKEN #IMPLIED ">
<!ENTITY % schema-ref.attrib " schema NMTOKEN #IMPLIED ">
<!ENTITY % table-name-ref.attrib " name NMTOKEN #IMPLIED ">
<!ENTITY % object-name.attrib.required " name NMTOKEN #REQUIRED ">
<!ENTITY % object-name.attrib.implied " name NMTOKEN #IMPLIED ">
<!ENTITY % table-alias.attrib " name NMTOKEN #IMPLIED ">
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A relational expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some operation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The built-in global boolean variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The built-in variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An expression that may be evaluated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
One or more Value-expressions.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A logical expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A boolean expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A boolean expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An optional conditon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================
Datatypes

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
May be used for all elements that have a datatype
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ENTITY % datatype " type CDATA #REQUIRED length CDATA #IMPLIED scale CDATA #IMPLIED charset CDATA #IMPLIED collate CDATA #IMPLIED ">
<!--===========================================
Character String types

============================================-->
<!ENTITY char "CHARACTER">
<!ENTITY charv "CHARACTER VARYING">
<!ENTITY clob "CHARACTER LARGE OBJECT">
<!--===========================================
Binary String type

============================================-->
<!ENTITY blob "BINARY LARGE OBJECT">
<!--===========================================
Bit String types

============================================-->
<!ENTITY bit "BIT">
<!ENTITY bit "BIT VARYING">
<!--===========================================
Exact numeric types

============================================-->
<!ENTITY num "NUMERIC">
<!ENTITY dec "DECIMAL">
<!ENTITY int "INTEGER">
<!ENTITY sint "SMALLINT">
<!--===========================================
Approximate numeric types

============================================-->
<!ENTITY float "FLOAT">
<!ENTITY real "REAL">
<!ENTITY double "DOUBLE PRECISION">
<!--===========================================
Boolean type

============================================-->
<!ENTITY bool "BOOLEAN">
<!--===========================================
Datetime types

============================================-->
<!ENTITY date "DATE">
<!ENTITY time "TIME">
<!ENTITY tstamp "TIMESTAMP">
<!--===========================================
Interval types

============================================-->
<!ENTITY range "INTERVAL">
<!--===========================================
All set operations

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set operations A set operation operates on two table-expressions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================
Table expresssions

============================================-->
<!--===========================================
Query structure and Select expressions

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Specifying a query starts by specifying what data should be queried. This is done by specifying a table expression Optionally, the data is reduced by filtering it against a condition. Only The data for which the condition is true, is maintained Optionally, individual units of data (rows) may be grouped. Optionally, a filter may be applied to these groups From the data that now remains, individual items may be picked.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The elements that encode selective code control.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The elements that encode iterative code control.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The elements that encode sequential code control.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All elements that encode code-flow control.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structural features.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Declarations.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Operations that may be performed on a cursor.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Executables.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Executables.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exception or Error handlers.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An optional value-expression for initializing a variable.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The content model for block-like structures.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The content model for invokeables.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Miscellaneous elements


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Refers to some schema object
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Document element.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Includes a valid xcdsql resource. Using this element is equivalent to using an general entity-ref that identifies the resource
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT incl  (doc?)>
<!-- The uniform resource identifier from where the contents of the resource may be collected. -->
<!ATTLIST incl uri   CDATA   #REQUIRED>
<!--===========================================

Documentation


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Includes documentation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT doc ANY>
<!-- The type of documentation, implementation or functional -->
<!ATTLIST doc type   (func|impl)   "func">
<!-- The css style attribute -->
<!ATTLIST doc style   CDATA   #IMPLIED>
<!-- The name of the html-tag to markup this documentation -->
<!ATTLIST doc tag   (a|abbr|acronym|address|applet|area|b|base|basefont|bdo|big|blockquote|body|br|button|caption|center|cite|code|col|colgroup|dd|del|dfn|dir|div|dl|dt|em|fieldset|font|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|hr|html|i|iframe|img|input|ins|isindex|kbd|label|legend|li|link|map|menu|meta|noframes|noscript|object|ol|optgroup|option|p|param|pre|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|ul|var)   "div">
<!-- The css class attribute -->
<!ATTLIST doc class   NMTOKEN   #IMPLIED>
<!-- The css style attribute -->
<!ATTLIST doc style   CDATA   #IMPLIED>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets an attribute value for the html-element specified by it's parent doc element. The attribute is identified by the name attribute, whereas the value is specified as pcdata content.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT doc-att  (#PCDATA)>
<!-- The name of the attribute. -->
<!ATTLIST doc-att name   NMTOKEN   #REQUIRED>
<!--===========================================

The built-in global variables


============================================-->
<!--===========================================
The built-in global boolean variables

============================================-->
<!--===========================================

Operator constructs


============================================-->
<!--===========================================

Arithmic Operations


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Adds all of it's arguments. Equivalent to an arithmic +.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Concatenates all of it's arguments. Equivalent to sql ||.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Divides all of it's arguments. Equivalent to an arithmic /.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns e raised to the power of the argument.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns the factorial of it's argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Takes the natural logaritm of it's argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Takes the logaritm of all of its arguments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Takes the base 10 logaritm of its argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unary minus.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modulus of all of it's arguments.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Multiplies all of it's arguments. Equivalent to an arithmic *.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unary plus.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Raise to the power.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Root.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Subtracts all of it's arguments. Equivalent to an arithmic -.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Relational Operations

Relational expressions take non-boolean arguments and return a boolean value

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if the first argument matches the pattern specified by the second argument The pattern may use the percent and the underscore sign as metacharacters. In the pattern, a percent character is interpreted as zero or more arbitrary characters, the underscore is interpreted as an arbitrary character, and every other character is represents itsself. If a metcharacter is needed literally in the pattern, it must be escaped. In this case, the metacharacter may be escaped by a single escape character which must appear right before the metacharacter. The escape character may be specified as the third argument.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if the first argument matches the pattern specified by the second argument The pattern must be specified as a regular expression.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if all of it's arguments are equal to each other. If the arguments are not all of the same type, conversion is applied implicitly. In that case, conversion should take place before the comparisons, and there should be only on target type of the conversion.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if each argument is greater than it's subsequent argument. If the arguments are not all of the same type, conversion is applied implicitly. In that case, conversion should take place before the comparisons, and there should be only on target type of the conversion.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if each argument is greater than or equal to it's subsequent argument. If the arguments are not all of the same type, conversion is applied implicitly. In that case, conversion should take place before the comparisons, and there should be only on target type of the conversion.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if each argument is less than it's subsequent argument. If the arguments are not all of the same type, conversion is applied implicitly. In that case, conversion should take place before the comparisons, and there should be only on target type of the conversion.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if each argument is less than or equal to it's subsequent argument. If the arguments are not all of the same type, conversion is applied implicitly. In that case, conversion should take place before the comparisons, and there should be only on target type of the conversion.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if all of it's arguments are null.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if noe of it's arguments are null.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns true if and only if none of it's arguments are equal to one another. If the arguments are not all of the same type, conversion is applied implicitly. In that case, conversion should take place before the comparisons, and there should be only on target type of the conversion.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Logical Operations

Logical expressions. Logical expressions take boolean arguments and return a boolean value

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
is true if and only if all if it's arguments are true
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
is true if and only if all if it's arguments are false
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
is true when one or more arguments are true
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Schema definition


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Specifies a default value for a column
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Specifies a derived column value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Constructs


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alters some database object.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Creates some database object.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Destroys some database object.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Schema objects


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a check constraint
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Specifies a table or view column.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT col (%col-init;,%optional-constraints;)>
<!-- The name for this column. -->
<!ATTLIST col name   NMTOKEN   #REQUIRED>
<!ATTLIST col %datatype;>
<!-- The nullability for this column. -->
<!ATTLIST col nullable   (false|true)   "true">
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a domain
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A function.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a generator. When the call content is not present, equivalent to a SEQUENCE in Oracle, or an IDENTITY column in MSSQL Interbase implements generators.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT gen  (call?)>
<!ATTLIST gen %schema-object.optional-identifier.attrib;>
<!-- The initial value -->
<!ATTLIST gen init   CDATA   "1">
<!-- The increment -->
<!ATTLIST gen inc   CDATA   "1">
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines an unique constraint , or primary key
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT key  (col-ref*)>
<!ATTLIST key %table-ref.attrib;>
<!ATTLIST key %object-name.attrib.implied;>
<!ATTLIST key type   (primary|unique)   "unique">
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A procedure.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a foreign key constraint
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT ref (col-ref*,tab-ref)>
<!ATTLIST ref %table-ref.attrib;>
<!ATTLIST ref %object-name.attrib.implied;>
<!-- Is this a primary key. -->
<!ATTLIST ref primary   (false|true)   "false">
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a database table.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a trigger.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a database view.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Data manipulation constructs


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A non-top level query.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A top level query. The sequence op operations described for a query may be expanded by sorting the result rows This is only meaningful for top level queries.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
defines a single row select
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Adds records to a view or table.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT insert (%optional-condition;,col-ref*,(%value-expressions;|select))>
<!-- Identifies the table that recieves the insert -->
<!ATTLIST insert %table-ref.attrib;>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Changes existing data present in a view or table.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT update (%optional-condition;,col-ref*,(%value-expressions;|select))>
<!-- Identifies the table that recieves the update -->
<!ATTLIST update %table-ref.attrib;>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Removes records from a view or table.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT delete %optional-condition;>
<!-- Identifies the table that recieves the delete -->
<!ATTLIST delete %table-ref.attrib;>
<!--===========================================
The set operations

============================================-->
<!--===========================================
The non-set operations

============================================-->
<!ELEMENT col-ref  EMPTY>
<!ATTLIST col-ref %table-ref.attrib;>
<!ATTLIST col-ref %object-name.attrib.required;>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Speceifies that the cartesian product of all it's arguments should be used
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Specifies that the data from two tables should be joined. If the using attribute is defined, the tables are joined according to the condition that may be generated from the specfied foreign key
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT join (%table-expression;,%table-expression;,%relational-operation;)>
<!-- The type of this join -->
<!ATTLIST join type   CDATA   "inner">
<!-- The name of a foreign key that may be used to construct the join condition -->
<!ATTLIST join using   NMTOKEN   #IMPLIED>
<!--===========================================
Subqueries

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A boolean expression that is true if and only if the first argument is found in the second argument.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A boolean expression that is true if and only if it's argument yields at least one row.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================
Other query contents

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Specifies that groups of rows should be returned instead of individual rows.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Specifies the order in which the final result set must be returned
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--===========================================

Transaction control constructs


============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makes changes to the database persistent
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT commit  EMPTY>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Undoes uncommitted changes made to the database. By specifying the savepoint attribute, only the changes made after the creation of the savepoint are rolled back.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT rollback  EMPTY>
<!-- The name of the savepoint up to where rollback must be performed -->
<!ATTLIST rollback savepoint   NMTOKEN   #IMPLIED>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Creates a savepoint.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT savepoint  EMPTY>
<!-- The name that identifies this savepoint -->
<!ATTLIST savepoint name   NMTOKEN   #REQUIRED>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Destroys a savepoint.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT release  EMPTY>
<!-- The name that identifies the savepoint -->
<!ATTLIST release savepoint   NMTOKEN   #REQUIRED>
<!--===========================================

Access control constructs


============================================-->
<!ELEMENT allow ANY>
<!ELEMENT deny ANY>
<!--===========================================

Procedural constructs


============================================-->
<!--===========================================
The compilation-units: non-invokeable

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A block.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT block %block.content;>
<!-- Identifies this block. -->
<!ATTLIST block label   NMTOKEN   #IMPLIED>
<!--===========================================
The compilation-units: invokeable

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A parameter for an invokeable.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT param %optional-value-expression;>
<!-- Identifies this parameter. -->
<!ATTLIST param name   NMTOKEN   #REQUIRED>
<!ATTLIST param %datatype;>
<!ATTLIST param mode   (in|out|inout)   "in">
<!--===========================================
The declarations

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
declares an error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT err  EMPTY>
<!-- identifies this error -->
<!ATTLIST err
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Declares an immutable variable.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT const %value-expression;>
<!-- The name that identifies this constant within its block. -->
<!ATTLIST const name   NMTOKEN   #REQUIRED>
<!ATTLIST const %datatype;>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Declares a variable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT var %optional-value-expression;>
<!-- The name that identifies this variable within its block. -->
<!ATTLIST var name   NMTOKEN   #REQUIRED>
<!ATTLIST var %datatype;>
<!--===========================================
flow-control

============================================-->
<!--===========================================
flow-control: sequence

============================================-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An invocation of a procedure or function, transferring control to the procedure or function.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT call  (assn*)>
<!-- The name of the procedure or function. -->
<!ATTLIST call routine   NMTOKEN   #REQUIRED>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exits a block, loop, choose or if. If the condition is specified, the exit is performed once the condition evaluates to true.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT exit %optional-condition;>
<!-- If specified, the label of block to exit, or else that of the current block. -->
<!ATTLIST exit block   NMTOKEN   #IMPLIED>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Transfers control to another block
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!ELEMENT goto %optional-condition;>
<!-- The label of the block from where execution will resume. -->
<!ATTLIST goto block   NMTOKEN   #REQUIRED>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns from a function or procedure. The value expression is ignored for procedures. If the value-expression is ommited, the function will return null.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~