Defining Database
A database is a repository for organizing, storing, and managing data. Database Definition mainly includes creating databases, modifying database attributes, and deleting databases. For the related SQL statements, please refer to the table below.
Database Definition SQL
Feature | Related SQL |
Create a database | CREATE DATABASE |
Modifying database attributes | ALTER DATABASE |
Dropping a Database | DROP DATABASE |
Schema Definition
A schema is a collection of database objects primarily used to control access to database objects. For the related SQL statements, please refer to the table below.
Schema Definition SQL
Feature | Related SQL |
Creating Schema | CREATE SCHEMA |
Modifying schema attributes | ALTER SCHEMA |
Deletion Mode | DROP SCHEMA |
Table Definition
A table is a special data structure in a database used to store data objects and the relationships between objects. For the related SQL statements, please refer to the table below.
Table Definition SQL
Feature | Related SQL |
Create a table | CREATE TABLE |
Modifying table attributes | ALTER TABLE |
Deleting a table | DROP TABLE |
Note
A single ALTER statement supports only one DDL operation. Executing multiple DDL operations simultaneously may corrupt index metadata.
Definition of Partition Table
A partition table is a logical table where data is stored by regular tables and is primarily used to improve query performance. For the related SQL statements, please refer to the table below.
Partition Table Definition Related SQL
Feature | Related SQL |
Creating a Partition Table | CREATE TABLE ….PARTITION BY… |
Creating a Partition | ALTER TABLE …ADD PARTITION… |
Modifying Partition Table Properties | ALTER TABLE …RENAME/SPLIT PARTITION… |
Deleting a Partition | ALTER TABLE ….DROP PARTITION … |
Deleting a table | DROP TABLE |
Note
A single ALTER statement supports only one DDL operation. Executing multiple DDL operations simultaneously may corrupt index metadata.
Definition of Index
An index is a structure that orders values in one or more columns of a database table. Using an index allows for fast access to specific information within a database table. For the related SQL statements, please refer to the table below.
Index Definition Related SQL
Feature | Related SQL |
Creating an Index | CREATE INDEX |
Modifying Index Properties | ALTER INDEX… |
Deleting an Index | DROP INDEX |
Reindexing | REINDEX |
Note
A single ALTER statement supports only one DDL operation. Executing multiple DDL operations simultaneously may corrupt index metadata.
Role Definition
A role is used to manage permissions. From a database security perspective, all management and operational permissions can be divided into different roles. For related SQL statements, please refer to the table below.
Role Definition Related SQL
Feature | Related SQL |
Creates role | CREATE ROLE |
Modifying Role Attributes | ALTER ROLE… |
Deletes role | DROP ROLE |
User Definition
A user is a database role with default LOGIN permissions. For related SQL statements, please refer to the table below.
User Related SQL
Feature | Related SQL |
Creating user | CREATE USER |
Modifying User Attributes | ALTER USER |
Deleting user | DROP USER |
Creating function
Feature | Related SQL |
Creating function | CREATE FUNCTION |
Modifying Function Attributes | ALTER FUNCTION |
Deleting function | DROP FUNCTION |
View Definition
A view is a virtual table derived from one or more base tables. It can be used to control user data access. Please refer to the table below.
Feature | Related SQL |
Creating View | CREATE VIEW |
Dropping View | DROP VIEW |
Operating Session
The connection established between a user and the database is called a session. Please refer to the table below.
Feature | Related SQL |
Modifying Session | ALTER SESSION |
Definition Resource Queue
The Load Group is a system table used by the load management module. It is mainly used to specify the number of concurrent jobs that can run within the associated resource pool. For the SQL statements involved, please refer to the table below.
Feature | Related SQL |
Creating Resource Queue | CREATE RESOURCE QUEUE |
Delete Resource Queue | DROP RESOURCE QUEUE |
Modifying Resource Queue | ALTER RESOURCE QUEUE |