What is the DDL class in Magento?

The only DDL class in Magento is Varien_Db_Ddl_Table. The DDL class consists of a const variable corresponding with types of data (Boolean, small int, integer) and some keywords in SQL (CASCADE, RESTRICT,…)
The DDL class includes functions to work with the Table object in the database such as:
addColumn()
addForeignKey()
addIndex()

Some important functions in the DDL class:

addColumn($name, $type, $size = null, $options = array(), $comment = null)

$name: the name of a field (column)
$type: the type of data. For instance: TYPE_BOOLEAN, TYPE_SMALLINT, TYPE_INTEGER…
$size: the size of a field (0, 255, 2M,…)
$option: identity (true/false), nullable(true/false), primary (true/false), default (value)
$comment: add comments to the field

addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete = null, $onUpdate = null)

$fkName: the name of the foreign key
$column: the name of the field (column) set into the foreign key
$ refTable: the name of the reference table
$ refColumn: the name of the column table
$onDelete: identify an action needs to be implemented when the data of the reference table is deleted (ACTION_CASCADE, ACTION_SET_NULL, ACTION_NO_ACTION, ACTION_RESTRICT, ACTION_SET_DEFAULT)
$onUpdate: : identify an action needs to be implemented when the data of the reference table is updated ( ACTION_CASCADE, ACTION_SET_NULL, ACTION_NO_ACTION, ACTION_RESTRICT, ACTION_SET_DEFAULT)

addIndex($indexName, $fields, $options = array())

$ indexName: the name of index
$fields: the name/ array of field which is set into index (array or string)