Browsable SQLDDL 1.0 Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: §wip/atl/SQLDDL/extracted
Source used for this grammar: Marcos Didonet Del Fabro, SQLDDL 1.0, SQLDDL.ecore, 2006/08/28

Summary

Syntax

Boolean ::=
	"true"
	"false"
Integer ::=
	integer
String ::=
	string
LocatedElement ::=
	NamedElement
LocatedElement ::=
	TableElement
LocatedElement ::=
	Value
NamedElement ::=
	Database
NamedElement ::=
	Table
NamedElement ::=
	Type
NamedElement ::=
	Parameter
Database ::=
	[tables]::Table+
Table ::=
	[database]::Database [referencedBy]::ForeignKey+ [elements]::TableElement+ [parameters]::Parameter+
TableElement ::=
	Column
TableElement ::=
	Key
Column ::=
	[referencedBy]::ForeignKey+ [name]::String [type]::Type [canBeNull]::Boolean [default]::Value [keys]::Key+
Key ::=
	SimpleKey
Key ::=
	PrimaryKey
Key ::=
	ForeignKey
SimpleKey ::=
	[isUnique]::Boolean [name]::String [columns]::Column+
PrimaryKey ::=
	[isUnique]::Boolean [name]::String [columns]::Column+
ForeignKey ::=
	[referencedTable]::Table [referencedColumns]::Column+
Type ::=
	[length]::Integer [isUnsigned]::Boolean
Parameter ::=
	[table]::Table [value]::Value
Value ::=
	IntegerVal
Value ::=
	NullVal
Value ::=
	StringVal
IntegerVal ::=
	[value]::Integer
NullVal ::=
	ε
StringVal ::=
	[value]::String

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []