Database Concepts: PL/SQL and Teradata

Covers database programming concepts including PL/SQL functions, procedures, triggers, and Teradata-specific features like Primary Index, Secondary Index, PPI tables, and utilities (Fastload, Multiload)

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

The keyword return is compulsory in

  1. Procedure definition
  2. Function definition
  3. both A & B
  4. Option in both A & B
Question 2 True/False

Examine this database trigger CREATE OR REPLACE TRIGGER prevent_gross_modification {additional trigger information} BEGIN IF TO_CHAR(sysdate, DY) = MON THEN RAISE_APPLICATION_ERROR(-19999,'user Defined error'); END IF; END; This trigger will error out

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

_________ is the maximum nuber of Exceptions that the PL/SQL engine will process before exiting out of the BLOCK.

  1. only one
  2. All that apply
  3. I Dont know
  4. None of the above
Question 4 True/False

A procedure can have a procedure declaration inside

  1. True
  2. False
Question 5 Multiple Choice (Multiple Answers)

Multiload will not support

  1. USI
  2. NUSI
  3. Both a and b
  4. Neither a nor b
Question 6 True/False

In Teradata, indexes are maintained by the Senior Database Administrator

  1. True
  2. False
Question 7 Multiple Choice (Multiple Answers)

Secondary Index is used for

  1. Access the rows
  2. Distribution of the rows
  3. Both a and b
  4. Only for distribution of rows to particular AMPs
Question 8 True/False

Primary Index is mandatory for teradata table

  1. True
  2. False
Question 9 Multiple Choice (Multiple Answers)

Primary Index is used for

  1. Access the rows
  2. Distribution of the rows
  3. Both a and b
  4. Only for distribution of rows to particular AMPs
Question 10 Multiple Choice (Multiple Answers)

Fastload will not support

  1. USI
  2. NUSI
  3. Both a and b
  4. Neither a nor b
Question 11 Multiple Choice (Multiple Answers)

Primary index value can be changed

  1. At a cost of row redistribution
  2. At a cost of table recreation
  3. When the table is empty
  4. None of the above
Question 12 Multiple Choice (Multiple Answers)

Reading the rows using Non-Unique Secondary index is

  1. One or Two AMP operation
  2. All AMP operation
  3. Many AMP operation
  4. Full table scan
Question 13 Multiple Choice (Multiple Answers)

For PPI table, rows are first sorted by ------ at each AMPs

  1. Hash Value
  2. Partition Number
  3. First column of the table
  4. Both a and b
Question 14 True/False

Reading the rows using Non-Unique Primary index is one AMP operation

  1. True
  2. False
Question 15 Multiple Choice (Multiple Answers)

Teradata table will have ------ Primary Index

  1. Many
  2. Two
  3. One
  4. 64
Question 16 Multiple Choice (Multiple Answers)

Reading the rows using Unique Secondary index is

  1. One or Two AMP operation depends on the base row location
  2. Always two AMP operation irrespective of the base row location
  3. Many AMP operation
  4. All AMP operation
Question 17 True/False

Views can be specified in a trigger statement

  1. True
  2. False
Question 18 True/False

Two functions can be used with the same name in a PL/SQL block

  1. True
  2. False
Question 19 Multiple Choice (Single Answer)

What is the maximum number of statements that can be specified in a trigger statement?

  1. 1
  2. 2
  3. 3
  4. 4
Question 20 Multiple Choice (Single Answer)

Which of the following is not a schema object?

  1. Index
  2. Tables
  3. Public Synonymns
  4. Triggers