18. Maintaining Tables

Keywords Introduced

CREATE TABLE • DROP TABLE • CREATE INDEX • DROP INDEX

With this chapter, we change our focus from data retrieval and modification to design. Up until now, we’ve assumed that tables simply exist and are available to any interested user. However, in the normal course of events, someone must create tables before their data can be accessed. We therefore turn to the question of how to create and maintain tables.

We previously touched on a few of the topics we’ll be addressing, such as primary and foreign keys, but we now want to delve into these areas in greater detail, and also address the related topic of table indexes.

Data Definition Language

Back in Chapter 1, we mentioned the three main components ...

Get The Language of SQL, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.