A data definition language (DDL) is a syntax provided by a database management system (DBMS) used to define the structure of data (schema) within a database. This type of language is used to create and modify object representations such as tables, indexes, and views.
In structured query language (SQL) DDL commands are used to access, manipulate, and update data. Examples of these commands include
DELETE. As the syntax implies, the
CREATE command can be used to perform actions such as
CREATE TABLE or
CREATE VIEW based on programmer intent.
Sequences of DDL commands are often preserved in scripts for common or repeated operations. For example, the Django framework provides a built-in database migration management system that auto-generates DDL to create or alter database schema based on its class-based modeling system.
Data definition languages are very similar to Data manipulation language (DML). In practice, these are the same root language and merely subsets of commands. For example, data definitions are made with the
DROP commands whereas data manipulation language consists of