SQL is used to manipulate the data in a database and to query the database. It's also used to define and change the structure of the data—in other words, to implement the data model. You already know this from the previous chapters.
In general, SQL has three parts:
- Data Definition Language (DDL)
- DML
- Data Control Language (DCL)
The first part is used to create and manage the structure of the data, the second part is used to manage the data itself, and the third part controls access to the data. Usually, the data structure is defined only once, and then it's rarely changed. However, data is constantly inserted into the database, changed, or retrieved. For this reason, the DML is used more often than the DDL.
SQL is not an imperative programming language, which makes it different from many other languages. To be more specific, you cannot define...