DB2 Schema creating process for a User

DB2 Schema
DB2 Schema

A schema is a collection of named objects. Schemas provide a logical classification of objects in the database.

What a schema can contain?

A schema can contain tables, views, nicknames, triggers, functions, packages, and other objects.

A schema is also an object in the database. It is explicitly created using the CREATE SCHEMA statement with the current user recorded as the schema owner. It can also be implicitly created when another object is created, provided the user has IMPLICIT_SCHEMA authority.

A schema name is used as the high-order part of a two-part object name. If the object is specifically qualified with a schema name when created, the object is assigned to that schema. If no schema name is specified when the object is created, the default schema name is used.

For example, a user with DBADM authority creates a schema called C for
user A:
CREATE SCHEMA C AUTHORIZATION A
User A can then issue the following statement to create a table called X in
schema C:
CREATE TABLE C.X (COL1 INT)

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.