GaussDB working-level developer certification—Chapter 5 GaussDB database operation and management

1. Basic operation of database objects

insert image description here
insert image description hereinsert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
Query the database:
postgres=# \l --Use meta-commands to view the database
postgres=# select * from pg_database; --View the database through the system table Table Note
insert image description here
insert image description here
insert image description here
insert image description here
:
Only the owner of the table has the permission to execute the ALTER TABLE command, and the system administrator defaults With this permission
, you cannot modify the tablespace of the partitioned table, but you can modify the tablespace of the partition. It
does not support modifying storage parameters. ORIENTATION does not
support adding auto-increment columns, or adding columns that contain nextval() expressions in the DEFAULT value
does not support enabling foreign tables and temporary tables. Row access control switch
When deleting the PRIMARY KEY constraint by the constraint name, the NOT NULL constraint will not be deleted. If necessary, the NOT NULL constraint needs to be deleted
manually
CLUSTER KEY table-level constraints do not support table-level constraints such as primary and foreign keys.
Field constraints supported by column-stored tables include NULL, NOT NULL, and DEFAULT constant values; modification of field constraints currently only supports modification of DEFAULT values ​​(SET DEFAULT) and Delete (DROP DEFAULT), currently does not support
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
the modification of the non-null constraint NULL/NOT NULL

  1. (True or false) When there are multiple databases, you need to specify the corresponding database instance to connect to through the -d parameter. (A)
    A. True
    B. False
  2. (True or False) Create an index on the join condition. For queries with multi-field joins, it is recommended to build a composite index on these fields. (B)
    A. True
    B. False
    original words: For queries with multi-field connections, create indexes on the connection conditions

2. Data dictionary

insert image description here
insert image description here
insert image description here

3. Stored procedure

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
thinking questions

  1. (Single-choice question) What scenarios does the anonymous block apply to? (D)
    A. Execute frequently
    B. Execute repeatedly
    C. Execute concurrently
    D. Execute once
  2. (Multiple choice) Which of the following syntaxes can be used to open a cursor? (AC)
    A. OPEN
    B. START
    C. OPEN FOR
    D. BEGIN

Guess you like

Origin blog.csdn.net/qq_40220309/article/details/130174839