Chapter 5

Knowing the Major Components of SQL


Bullet The Data Definition Language (DDL)

Bullet The Data Maintenance Language (DML)

Bullet The Data Control Language (DCL)

You can view SQL as being divided into three distinct parts, each of which has a different function. With one part, the Data Definition Language (DDL), you can create and revise the structure (the metadata) of a database. With the second part, the Data Manipulation Language (DML), you can operate on the data contained in the database. And with the third part, the Data Control Language (DCL), you can maintain a database’s security and reliability.

In this chapter, I look at each of these SQL components in turn.

Creating a Database with the Data Definition Language

The Data Definition Language (DDL) is the part of SQL that you use to create a database and all its structural components, including tables, views, schemas, and other objects. It is also the tool that you use to modify the structure of an existing database or destroy it after you no longer need it.

In the text that follows, I tell you about the structure of a relational database. Then I give you instructions for creating your own SQL database with some simple ...

Get SQL All-in-One For Dummies, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.