Schemas are used to group database objects that logically belong together. A database object can belong to precisely one schema.
Schemas are created as follows:
· When it generates a new database user, the database system implicitly creates a schema with the same name.
When a new database instance is generated, the database system administrator (SYSDBA user) is created and, therefore, a schema with the same name is created implicitly. The database system also creates the following schemas for the database system administrator: SYS, DOMAIN, SYSINFO.
· Database administrators can create schemas explicitly.
Each new database object is assigned to a schema.
· The database user who creates the database object can explicitly assign the database object to a schema.
The database user BORIS creates the table person and assigns it to the schema OFFICE.
CREATE TABLE OFFICE.person
(pno FIXED(6),
name CHAR(20),
city CHAR(20))
· If the database user does not enter a schema when creating the database object, the database system assigns the database object automatically to the schema of the database user who is currently logged on.
The database user BORIS creates the table person. The database system assigns the table to the schema BORIS.
CREATE TABLE person
(pno FIXED(6),
name CHAR(20),
city CHAR(20))
See also:
Reference Manual, Schema Name (schema_name)