Data Definition Language
From Wikipedia, the free encyclopedia
Categories: All articles with unsourced statements | Articles with unsourced statements since May 2007 | Database stubs | SQL | Data modeling languages | Articles with example SQL code
|
A Data Definition Language (DDL) is a computer language for defining data structures. The term was first introduced in relation to the Codasyl database model, where the schema of the database was written in a Data Definition Language describing the records, fields, and "sets" making up the user Data Model. It is now used in a generic sense to refer to any formal language for describing data or information structures.
XML SchemaXML Schema is an example of a pure DDL[citation needed] (although only relevant in the context of XML). SQLA subset of SQL's instructions form another DDL. These SQL statements define the structure of a database, including rows, columns, tables, indexes, and database specifics such as file locations. DDL SQL statements are more part of the DBMS and have large differences between the SQL variations. DDL SQL commands include the following: CREATE statementsCreate - To make a new database, table, index, or stored query. A CREATE TABLEPerhaps the most common
Column Definitions: A comma-separated list consisting of any of the following
For example, the command to create a table named employees with a few sample columns would be: <source lang="sql"> CREATE TABLE employees ( id INTEGER PRIMARY KEY, first_name CHAR(50) null, last_name CHAR(75) not null, date_of_birth DATE null ); </source> DROP statementsDrop - To destroy an existing database, table, index, or view. A The typical usage is simply <source lang="sql"> DROP TABLE employees; </source> The ALTER statementsAlter - To modify an existing database object. An The typical usage is <source lang="sql"> ALTER TABLE sink ADD bubbles INTEGER; </source> See also
es:Lenguaje de definición de datos eu:Datuak definitzeko lengoaia fr:Langage de définition de données it:Data Definition Language nl:Data Definition Language ja:データ定義言語 pl:Create (SQL) pt:Linguagem de definição de dados ru:DDL | ||||||||||||||||||


