Help Center/ GaussDB/ User Guide/ Database Use/ Overview of Database Usage
Updated on 2024-09-12 GMT+08:00

Overview of Database Usage

After creating a GaussDB instance, you can use DAS or SQL statements to perform basic database operations such as creating a database, creating a database user, creating tables, inserting data into tables, and deleting data from tables based on your requirements. For details, see Table 1.

Basic operations should comply with relevant design specifications. For details, see the Development and Design Proposal.

You can also develop applications based on the JDBC, ODBC, libpq, Psycopg, ecpg and Go drivers. For details, see Application Development Guide.

Table 1 Database operations

Database Operations

Description

Creating a database

These sections describe how to create a database using DAS and the CREATE DATABASE command.

Creating a database user

This section describes how to use the CREATE USER command to create a database user. Data is not shared between users.

Creating a table

Creating a Table Using SQL Statements

A table is created in a database and can be stored in different databases. Tables under different schemas in a database can have the same name. This section describes how to use the CREATE TABLE command to create a table.

Inserting data to a table

Inserting Data into a Table Using SQL Statements

A new table contains no data. You need to insert data to the table before using it. This section describes how to insert one or more rows of data using the INSERT command.

Updating data in a table

Updating Data in a Table Using SQL Statements

You can update one row, all rows, or specified rows of data. You can update data in a single column without affecting the data in the other columns. This section describes how to use the UPDATE command to update data in a table.

Viewing data in a table

These sections describe how to use SQL statements to view data in tables and how to open tables and view table details on the DAS console.

Deleting data from a table

Deleting Data from a Table Using SQL Statements

Outdated data may need to be deleted when tables are used. This section describes how to use SQL statements to delete tables or table data.

Creating and managing views

These sections describe how to create, query, and delete views using SQL statements, and how to open a view and view details of a view through DAS.

Creating and managing tablespaces

Creating and Managing Tablespaces Using SQL Statements

This section describes how to create tablespaces, create objects in tablespaces, query tablespaces, query tablespace usage, change tablespace names, and delete tablespaces.

Querying system catalogs

Querying System Catalogs Using SQL Statements

This section describes how to query the system catalogs.

Creating and managing schemas

Creating and Managing Schemas Using SQL Statements

This section describes how to create a schema, use a schema, view the search path of a schema, control schema permissions, and delete a schema.

Creating and managing partitioned tables

Creating and Managing Partitioned Tables Using SQL Statements

This section describes how to create a partitioned table, insert data into a table, modify the row migration attributes of a partitioned table, delete a partition, add a partition, rename a partition, modify the tablespace of a partition, query a partition, and delete a partitioned table and tablespace.

Creating and managing indexes

Creating and Managing Indexes Using SQL Statements

This section describes how to create an index, modify the tablespace of an index partition, rename an index partition, query an index, and delete an index.

Creating and managing sequences

Creating and Managing Sequences Using SQL Statements

This section describes how to use a sequence to make a field a unique identifier.

Creating and managing scheduled jobs

Creating and Managing Scheduled Jobs Using SQL Statements

This section describes how to create a task, view task information, start a task, stop a task, modify task attributes, and delete a task.