<s>
In	O
the	O
context	O
of	O
SQL	B-Language
,	O
data	B-Language
definition	I-Language
or	O
data	B-Language
description	I-Language
language	I-Language
(	O
DDL	O
)	O
is	O
a	O
syntax	O
for	O
creating	O
and	O
modifying	O
database	O
objects	O
such	O
as	O
tables	B-Application
,	O
indices	O
,	O
and	O
users	O
.	O
</s>
<s>
DDL	O
statements	O
are	O
similar	O
to	O
a	O
computer	O
programming	O
language	O
for	O
defining	O
data	B-General_Concept
structures	I-General_Concept
,	O
especially	O
database	B-Application
schemas	I-Application
.	O
</s>
<s>
The	O
concept	O
of	O
the	O
data	B-Language
definition	I-Language
language	I-Language
and	O
its	O
name	O
was	O
first	O
introduced	O
in	O
relation	O
to	O
the	O
Codasyl	B-Language
database	O
model	O
,	O
where	O
the	O
schema	B-Application
of	O
the	O
database	O
was	O
written	O
in	O
a	O
language	O
syntax	O
describing	O
the	O
records	O
,	O
fields	B-Application
,	O
and	O
sets	O
of	O
the	O
user	O
data	B-Application
model	I-Application
.	O
</s>
<s>
Later	O
it	O
was	O
used	O
to	O
refer	O
to	O
a	O
subset	O
of	O
Structured	B-Language
Query	I-Language
Language	I-Language
(	O
SQL	B-Language
)	O
for	O
declaring	O
tables	B-Application
,	O
columns	O
,	O
data	O
types	O
and	O
constraints	O
.	O
</s>
<s>
SQL-92	B-Language
introduced	O
a	O
schema	B-Application
manipulation	O
language	O
and	O
schema	B-Application
information	O
tables	B-Application
to	O
query	O
schemas	B-Application
.	O
</s>
<s>
These	O
information	O
tables	B-Application
were	O
specified	O
as	O
SQL/Schemata	B-Language
in	O
SQL:2003	B-Language
.	O
</s>
<s>
Many	O
data	B-Language
description	I-Language
languages	I-Language
use	O
a	O
declarative	O
syntax	O
to	O
define	O
columns	O
and	O
data	O
types	O
.	O
</s>
<s>
Structured	B-Language
Query	I-Language
Language	I-Language
(	O
SQL	B-Language
)	O
,	O
however	O
,	O
uses	O
a	O
collection	O
of	O
imperative	O
verbs	O
whose	O
effect	O
is	O
to	O
modify	O
the	O
schema	B-Application
of	O
the	O
database	O
by	O
adding	O
,	O
changing	O
,	O
or	O
deleting	O
definitions	O
of	O
tables	B-Application
or	O
other	O
elements	O
.	O
</s>
<s>
These	O
statements	O
can	O
be	O
freely	O
mixed	O
with	O
other	O
SQL	B-Language
statements	O
,	O
making	O
the	O
DDL	O
not	O
a	O
separate	O
language	O
.	O
</s>
<s>
The	O
create	O
command	O
is	O
used	O
to	O
establish	O
a	O
new	O
database	O
,	O
table	O
,	O
index	O
,	O
or	O
stored	B-General_Concept
procedure	I-General_Concept
.	O
</s>
<s>
The	O
CREATE	O
statement	O
in	O
SQL	B-Language
creates	O
a	O
component	O
in	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
(	O
RDBMS	O
)	O
.	O
</s>
<s>
In	O
the	O
SQL	B-Language
1992	O
specification	O
,	O
the	O
types	O
of	O
components	O
that	O
can	O
be	O
created	O
are	O
schemas	B-Application
,	O
tables	B-Application
,	O
views	B-Language
,	O
domains	O
,	O
character	B-General_Concept
sets	I-General_Concept
,	O
collations	O
,	O
translations	O
,	O
and	O
assertions	O
.	O
</s>
<s>
Many	O
implementations	O
extend	O
the	O
syntax	O
to	O
allow	O
creation	O
of	O
additional	O
elements	O
,	O
such	O
as	O
indexes	B-Data_Structure
and	O
user	O
profiles	O
.	O
</s>
<s>
Some	O
systems	O
,	O
such	O
as	O
PostgreSQL	B-Application
and	O
SQL	B-Application
Server	I-Application
,	O
allow	O
CREATE	O
,	O
and	O
other	O
DDL	O
commands	O
,	O
inside	O
a	O
database	B-General_Concept
transaction	I-General_Concept
and	O
thus	O
they	O
may	O
be	O
rolled	B-Application
back	I-Application
.	O
</s>
<s>
Some	O
forms	O
of	O
CREATE	O
TABLE	O
DDL	O
may	O
incorporate	O
DML	O
(	O
data	B-Language
manipulation	I-Language
language	I-Language
)	O
-like	O
constructs	O
,	O
such	O
as	O
the	O
CREATE	O
TABLE	O
AS	O
SELECT	O
(	O
CTaS	O
)	O
syntax	O
of	O
SQL	B-Language
.	O
</s>
<s>
A	O
DROP	O
statement	O
in	O
SQL	B-Language
removes	O
a	O
component	O
from	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
(	O
RDBMS	O
)	O
.	O
</s>
<s>
The	O
types	O
of	O
objects	O
that	O
can	O
be	O
dropped	O
depends	O
on	O
which	O
RDBMS	O
is	O
being	O
used	O
,	O
but	O
most	O
support	O
the	O
dropping	O
of	O
tables	B-Application
,	O
users	O
,	O
and	O
databases	O
.	O
</s>
<s>
Some	O
systems	O
(	O
such	O
as	O
PostgreSQL	B-Application
)	O
allow	O
DROP	O
and	O
other	O
DDL	O
commands	O
to	O
occur	O
inside	O
of	O
a	O
transaction	B-General_Concept
and	O
thus	O
be	O
rolled	B-Application
back	I-Application
.	O
</s>
<s>
The	O
DROP	O
statement	O
is	O
distinct	O
from	O
the	O
DELETE	B-Language
and	O
TRUNCATE	B-Language
statements	O
,	O
in	O
that	O
DELETE	B-Language
and	O
TRUNCATE	B-Language
do	O
not	O
remove	O
the	O
table	O
itself	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
DELETE	B-Language
statement	O
might	O
delete	B-Language
some	O
(	O
or	O
all	O
)	O
data	O
from	O
a	O
table	O
while	O
leaving	O
the	O
table	O
itself	O
in	O
the	O
database	O
,	O
whereas	O
a	O
DROP	O
statement	O
removes	O
the	O
entire	O
table	O
from	O
the	O
database	O
.	O
</s>
<s>
An	O
ALTER	O
statement	O
in	O
SQL	B-Language
changes	O
the	O
properties	O
of	O
an	O
object	O
inside	O
of	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
(	O
RDBMS	O
)	O
.	O
</s>
<s>
The	O
TRUNCATE	B-Language
statement	O
is	O
used	O
to	O
delete	B-Language
all	O
data	O
from	O
a	O
table	O
.	O
</s>
<s>
It	O
's	O
much	O
faster	O
than	O
DELETE	B-Language
.	O
</s>
<s>
Another	O
type	O
of	O
DDL	O
sentence	O
in	O
SQL	B-Language
is	O
used	O
to	O
define	O
referential	B-General_Concept
integrity	I-General_Concept
relationships	O
,	O
usually	O
implemented	O
as	O
primary	B-Application
key	I-Application
and	O
foreign	B-Application
key	I-Application
tags	O
in	O
some	O
columns	O
of	O
the	O
tables	B-Application
.	O
</s>
<s>
XML	B-Protocol
Schema	B-Application
is	O
an	O
example	O
of	O
a	O
DDL	O
for	O
XML	B-Protocol
.	O
</s>
<s>
JSON	B-General_Concept
Schema	B-Application
is	O
an	O
example	O
of	O
a	O
DDL	O
for	O
JSON	B-General_Concept
.	O
</s>
<s>
DFDL	O
schema	B-Application
is	O
an	O
example	O
of	O
a	O
DDL	O
that	O
can	O
describe	O
many	O
text	O
and	O
binary	O
formats	O
.	O
</s>
