0

databases Online Quiz - 240

Description: databases Online Quiz - 240
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

What is the Max size of NVARCHAR2 in PL/SQL?

  1. 4000

  2. 8000

  3. 32768

  4. 32767


Correct Option: D
  1. SELECT FROM GROUP BY WHERE

  2. SELECT FROM GROUP BY ROLLUP

  3. SELECT GROUP BY FROM

  4. SELECT WHERE FROM GROUP BY


Correct Option: B

NULL values violate CHECK constraint

  1. True

  2. False


Correct Option: B
  1. ON DELETE SET NULL

  2. ON DELETE CASCADE

  3. ON DELETE DELETE

  4. ON DELETE RESTRICT


Correct Option: B
Explanation:

To answer this question, the user needs to have knowledge of database management systems and the concept of Foreign Keys.

When a Foreign Key references a Primary Key in another table, there is a possibility that the referenced record(s) may be deleted. In such cases, four actions can be taken: SET NULL, CASCADE, DELETE, or RESTRICT.

  • ON DELETE SET NULL: This option sets the Foreign Key value to NULL when the referenced record(s) are deleted. This may lead to data integrity issues and is not ideal in most cases.

  • ON DELETE CASCADE: This option deletes all the dependent rows in the child table when the referenced rows in the parent table are deleted. This is usually the preferred option when the child rows are no longer relevant without the parent rows.

  • ON DELETE DELETE: This syntax does not exist, and hence, it is incorrect.

  • ON DELETE RESTRICT: This option prevents the deletion of the referenced rows in the parent table when there are dependent rows in the child table. This is useful when the data in the child table is still relevant and associated with the data in the parent table.

Therefore, the correct answer is:

The Answer is: B. ON DELETE CASCADE

UNION ALL has a comparitively faster performance compared to UNION?

  1. True

  2. False


Correct Option: A

Which of these is a String Aggregation function used to get values from different rows into a single column?

  1. SUBSTR

  2. CON_STR

  3. CON_CAT

  4. WM_CONCAT


Correct Option: D
  1. Restricts the length of the String

  2. Replaces a sequence of characters in a string with another set of characters

  3. Modifies the datatype of a column

  4. Renames a column


Correct Option: B
  1. Replaces word by word

  2. Replaces a column with another column

  3. Replaces character by character

  4. Replaces a row with another row


Correct Option: A

How is IN different form EXISTS ?

  1. IN executes the inner query for each row affected by the outer query and EXISTS executes the inner query only once irrespective of the outer query

  2. IN executes the inner query only once irrespective of the outer query and EXISTS executes the inner query only once irrespective of the outer query

  3. IN executes the inner query only once irrespective of the outer query and EXISTS executes the outer query for each row affected by the outer query

  4. IN executes the inner query for each row affected by the outer query and EXISTS executes the outer query for each row affected by the outer query


Correct Option: C

Teradata components handle data distribution by

  1. AMP bucket number

  2. Primary Index

  3. Primary Key

  4. None of the above


Correct Option: B

_____ and _____ are true about the Primary Index

  1. Defined immediately after the table CREATE statement, used to find the Primary Key

  2. Defined during the table CREATE statement, used to assign rows to an AMP

  3. Defined immediately after the table CREATE statement, used to assign rows to an AMP

  4. Defined during the table CREATE statement, used to find the Primary Key


Correct Option: B
  1. Defined immediately after the table CREATE statement, used to assign rows to an AMP

  2. Defined immediately after the table CREATE statement, used to find the Primary Key

  3. Defined during the table CREATE statement, used to assign rows to an AMP

  4. Defined during the table CREATE statement, used to find the Primary Key


Correct Option: C

A new table has been created in the employee. There are no rows in the table.What would be the output of the following query?select count(*) from employee

  1. Error

  2. 1

  3. No data Found

  4. 0


Correct Option: D

Which of the query will print the output as 'TCS' (single quotes should come in the output of the query)

  1. select '''||'TCS'||''' from dual

  2. select 'TCS' from dual

  3. select '''TCS''' from dual

  4. select "TCS" from dual


Correct Option: A
  1. select '''||'TCS ||''' from dual

  2. select '''TCS''' from dual

  3. select "TCS" from dual

  4. select 'TCS' from dual


Correct Option: B

Session Handling is done by which part of teradata system?

  1. AMP

  2. PE

  3. BYNET

  4. CLIQUE


Correct Option: B

TERADATA is Shared _________ architecture.

  1. Nothing

  2. Everything

  3. Disk

  4. Processor


Correct Option: A
- Hide questions