Chapter 4: Creating a Database with SQL
In This Chapter
Establishing relationships between tables
Altering table structure
As I stated way back in Book I, Chapter 5, SQL is functionally divided into three components: the Data Definition Language (DDL), the Data Manipulation Language (DML), and the Data Control Language (DCL). The DDL consists of three statements:
DROP. You can use these statements to create database objects (such as tables), change the structure of an existing object, or delete an object. After you have designed a database, the first step in bringing it into reality is to build a table with the help of the DDL. After you have built the tables, the next step is to fill them with data. That’s the job of the DML. As for the DCL, you call on it to help you preserve data integrity. In this chapter, I discuss the functions of the DDL. The aspects of the DML that were not covered in Book I — namely queries ...