6.1. The SQL Data Definition Language

For the most part, relational databases are accessed and updated using SQL, Structured Query Language. As its name suggests, SQL has powerful support for answering queries. Its support for updates is rather limited. SQL isn’t a programming language; it is a sub-language that must be embedded in some other procedural language. (A popular choice is PHP.) SQL itself is non-procedural. When the user executes a query, the DBMS creates a procedure to answer it efficiently. One motive for describing SQL here is that the language closely mirrors what a DBMS can do and leads us naturally to the question of how a database schema can be optimised.
SQL includes a data-definition language. We illustrate its use by showing ...

Get Systems Analysis and Synthesis 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.