Creating a Schema

In relational database technology, schemas provide a logical classification of objects in the database. Some of the objects that a schema may contain include functions/procedures, tables, sequences, views, and indexes.

Follow the steps below to define a schema:

  1. In the Object Browser pane, right-click the selected Schemas group and select Create Schema.

    Note

    Only refresh can be performed on Catalogs group.

  2. Enter the schema name and click OK. You can create the schema only if the database connection is active.

    You can view the new schema in the Object Browser pane.

    The status bar displays the status of the completed operation.

You can perform the following actions on a schema:

Displaying the Default Schema

Data studio displays default schema of the user in the toolbar.

image1

When a create query without mentioning the schema name is executed from SQL Terminal, the corresponding objects are created under the default schema of the user.

When a select query is executed in SQL terminal without mentioning the schema name, the default schemas are searched to find these objects.

When Data Studio starts, the default schemas are set to <username>, public schemas in same priority.

If another schema is selected in the drop-down, the selected schema will be set as the default schema, overriding previous setting.

The selected schema is set as the default schema for all active connections of the database (selected in database list drop-down).

Note

This feature is not available for OLTP database.