Chapter 9 – Using SQL to Implement a Relational Design

Publisher Summary This chapter introduces the SQL commands that are used to create and maintain the tables, views, indexes, and other structures that make up the database. As a complete data manipulation language, SQL contains statements that allow inserting, modifying, deleting, and retrieving data. However, to a database designer, the portions of SQL that support the creation of database structural elements are of utmost importance. In current versions of SQL, none of the groupings of database elements are related to physical storage structures. If working with a centralized mainframe DBMS, one may find multiple catalogs stored in the same database file. The way in which database structural elements are named and identified is in some measure dictated by the structure hierarchy—column names must be unique within the table, table names must be unique within the schema, schema names must be unique within their catalog, and catalog names must be unique within their cluster. To a database designer, a schema represents the overall logical design of a complete database. As far as SQL is concerned, however, a schema is nothing more than a container for tables, views, and other structural elements. It is up to the database designer to place a meaningful group of elements within each schema.