wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ADBM_Quiz_2_C

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following is an example of data corruption spreading across replicas?

a)

Server crash

b)

Index rebuild

c)

Wrong update applied to all copies

d)

Schema mismatch

2.

Logical backups are typically created using:

a)

pg_basebackup

b)

filesystem copy

c)

pg_dump

d)

tar command

3.

Physical replication is best described as:

a)

Table-level copy

b)

Byte-for-byte copy of entire database

c)

Exporting rows to CSV

d)

Copying only indexes

4.

What keyword is used to create a procedure?

a)

MAKE

b)

SETUP

c)

CREATE PROCEDURE

d)

RUN PROC

5.

Local procedures in PL/pgSQL are simulated using:


a)

psql.exe

b)

Anonymous blocks (DO $$)

c)

Triggers

d)

SELECT blocks

6.

What does NEW.salary <> OLD.salary check for?


a)

Salary increase only

b)

If salary has changed

c)

Deletion

d)

Null values

7.

What clause defines when a trigger fires?


a)

SELECT

b)

AFTER/BEFORE

c)

ON LOG

d)

DO NOW

8.

What is the first step to using a cursor in PL/pgSQL?


a)

OPEN

b)

FETCH

c)

DECLARE

d)

PRINT

9.

In PostgreSQL, what does FOUND indicate?


a)

If a trigger fired

b)

If a row was affected

c)

If cursor is running

d)

If backup is done

10.

To stop fetching from cursor when done:


a)

CLOSE

b)

EXIT WHEN NOT FOUND

c)

BREAK

d)

END