3

Schema Level Objects

A database is not just a bunch of tables, even though that is where most of the work is done. There are stored procedures, user-defined functions, and cursors that the users create. Then there are indexes and other access methods that the user cannot access directly.

This chapter is a very quick overview of some of the schema objects that a user can create. Standard SQL divides the database users into USER and ADMIN roles. These objects require ADMIN privileges to be created, altered, or dropped. Those with USER privileges can invoke them and access the results.

3.1 CREATE SCHEMA Statement

There is a CREATE SCHEMA statement defined in the standards that brings an entire schema into existence all at once. In practice, each ...

Get Joe Celko's SQL for Smarties, 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.