DB2 Version 9.7 for Linux, UNIX, and Windows

Schemas

A schema is a unique identifier used to group a set of database objects (such as, tables, views, indexes, and aliases).

That is, if you were creating a table named PAYROLL, it would be tedious to have to search the database to find out whether some other user has already created a table with the same name. The name of each object needs to be unique only within its schema.

Most database objects have a two-part object name, the first part being the schema name and the second part is the name of the object. When an object is created, you can assign it to a specific schema. If you do not specify a schema, it is assigned to the default schema, which is usually the user ID of the person who created the object. For example, a user named Smith might have a table named SMITH.PAYROLL.

The schema also becomes an object in the database. It is created when the first object in the schema is created. A schema can be owned by an individual, and the owner can control access to the data and the objects within it.