7.6. Schemas

A schema is a database object used to logically group other database objects. Every database object name has two parts:

					schema_name.object_name
				

This two-part name (also known as the fully qualified name) must be unique within the database. Here are some examples:

					db2admin.tab1
					mary.idx1
					sales.tblspace1
				

When you create an object, it is always created within a schema, even if you do not explicitly specify the schema name. When you do not specify the schema name, DB2 uses the authorization ID (the ID used to connect to the database) as the object's schema. If you connect to a database as peter and in a query specify a table simply as tab1, DB2 will interpret this as peter.tab1.

NOTE

A schema does not need to map to a user ID. Any ...

Get Understanding DB2®: Learning Visually with Examples 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.