In databases, tables are the containers of information. There can be one or many tables in a database. They are also called entities. Columns with data in a table are called attributes of that table. The records which are saved in tables are called tuples.

To design / create a database, it is the prerequisite to first decide how many tables will be there and with what attributes. Furthermore, one should know the relationship between those tables.

There are different keys in tables to retrieve unique records / tuples from the tables. A primary key is used for this purpose and is needed to be defined on the time of creation of tables. Afterwards, the primary key of a table is used in other tables as a pointer and to create relation between those other tables and its own one; the primary key in linking tables is named a foreign key, as this key came from the other table.

The statements which are used to create and modify tables are called data definition language. Below is the description of Data Definition Language (DDL).

Data Definition Language (DDL) statements are used to define structure of database. The main database structure related statements are listed below:

  • CREATE - creates objects in the database
  • ALTER - alters the structure of the database
  • DROP - deletes objects from the database
  • TRUNCATE - removes all records from a table, including all spaces allocated for the records are removed