Help Center> GaussDB> Getting Started> GaussDB Common Practices
Updated on 2024-07-16 GMT+08:00

GaussDB Common Practices

After buying and connecting to a GaussDB instance, you can use GaussDB as required by referring to the common practices provided in this section.

Table 1 Common best practices of GaussDB

Practice

Description

Usage guidelines

Database Design Guidelines

This practice describes the guidelines for naming database objects and designing permissions, tables, fields, indexes, functions, and stored procedures when you use GaussDB.

Database Programming Guidelines

This practice describes the programming specifications that must be complied with when configuring GUC parameters, accessing objects, and using the WHERE, SELECT, INSERT, UPDATE, and DELETE statements, join queries, subqueries, as well as transactions in GaussDB.

Client Programming Guidelines

This practice describes the programming specifications that must be complied with when you use JDBC to connect to GaussDB.

Database usage

Creating a Database Account

This practice describes how to use CREATE USER and ALTER USER to create and manage database users, respectively. Data is not shared between users.

Creating and Managing Databases

This practice describes how to use CREATE DATABASE and ALTER DATABASE to create and manage database users, respectively.

Creating and Managing Tablespaces

The administrator can use tablespaces to control the layout of disks where a database is installed. This practice describes how to use SQL syntax to create and manage tablespaces.

Creating and Managing Tables

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 practice describes how to use SQL syntax to create tables.

Querying System Catalogs

In addition to the created tables, GaussDB contains many system catalogs. These system catalogs contain information about instance installation as well as the queries and processes running in GaussDB. This practice describes how to collect information about the databases by querying system catalogs.

Data migration

Migrating Data from Oracle Database to GaussDB

This practice describes how to use DRS to migrate data from Oracle databases to GaussDB.

Data backup

Configuring an Automated Backup Policy

This practice describes how to enable the system to automatically create backups for a DB instance during a backup window and save the backups based on the configured retention period.

Creating a Manual Backup

This practice describes how to create manual backups for a DB instance. These backups can be used to restore data for improved reliability.

Deleting a Manual Backup

You can delete manual backups for instances and tables to release storage space. This practice describes how to delete manual backups of an instance.

Data restoration

Restoring a Backup File to a DB Instance

This practice describes how to use an automated or manual backup to restore a DB instance to how it was when the backup was created. The restoration is at the instance level.

Restoring a DB Instance to a Specific Point in Time

This practice describes how to use an automated backup to restore instance data to a specified point in time.