-
The SQL DDL (Data Definition Language) allows specification of a set of
relations and the following information for each relation:
- The scheme for each relation.
- The domain of values for each attribute.
- The set of indices for each relation.
- Security and authorization information.
- Integrity constraints.
- Physical storage structure on disk.
-
An SQL relation is defined by:

where
is the relation name,
is the name of an attribute, and
is the domain of that attribute.
-
A newly loaded table is empty.
The insert command can be used to load it.
-
To remove a relation from the database, we can use the drop table
command:

This is not the same as

which retains the relation, but deletes all tuples in it.
-
The alter table command can be used to add attributes to an existing
relation:

where
is the attribute and
is the domain to be added.
This command appears in some versions of SQL, but not in the SQL standard.