0

databases Online Quiz - 121

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

Cascade option is used

  1. disable dependent integrity constraint

  2. deactivate an integrity constraint

  3. both of above

  4. none of above


Correct Option: A

To View all constraint definition and name table used is

  1. sys_constraints

  2. user_constraints

  3. tab_constraints

  4. col_constraints


Correct Option: B

View column associated with the constraint names view used is

  1. user_tab_columns

  2. user_cons_columns

  3. user_sys_columns

  4. all of above


Correct Option: B

can we insert a record in dual?

  1. True

  2. False


Correct Option: A

Can a primary key contain more than one columns?

  1. True

  2. False


Correct Option: A

Which one among the following is more faster?

  1. IN

  2. EXISTS

  3. LIKE

  4. EXIST


Correct Option: B

Can we use a scalar data type as return type for CURSOR?

  1. True

  2. False


Correct Option: B

Can cursor variables be stored in PL/SQL tables?

  1. True

  2. False


Correct Option: B

Can a function take OUT parameters.?

  1. True

  2. False


Correct Option: B

Can the default values be assigned to actual parameters?

  1. True

  2. False


Correct Option: A

Can you use a commit statement within a database trigger?

  1. True

  2. False


Correct Option: B

Can we call a procedure from Anonymous PL/SQL block?

  1. True

  2. False


Correct Option: A

can we have more than one column of BLOB(data type to store images) in a table?

  1. True

  2. False


Correct Option: B

Which of the following can duplicate the structure and related objects of a database table?

  1. Copy table

  2. Alter table

  3. Export table

  4. Generate DDL


Correct Option: D

DB2 Cursor Stablity i) Cursor Stablity Leads to Higher concurency ii) Repeatable Read Leads to Higher consistency

  1. Both are True

  2. i) Is Only True

  3. ii) is only True

  4. Neither is True


Correct Option: A

DB2 Indexes i ) Unique Index can be created only on Primary Key. ii) Query will execute faster if predicates are applied on Indexed column.

  1. Both are True

  2. i) Is Only True

  3. ii) is only True

  4. Neither is True


Correct Option: A

DB2 Index Storate Format Indexes is Stored in

  1. B - Tree format

  2. Hash Table

  3. AVL Tree

  4. Red Black Tree


Correct Option: A

When do you open cursor before Fetching i) Cursor should always be Opened before Fetching ii) Fetch Operation cursor retrieves Only ONE row for every execution.

  1. Both are True

  2. i) Is Only True

  3. ii) is only True

  4. Neither is True


Correct Option: A

Two or more transactions in a simultaneous wait state, each waiting for other to release before it can proceed, is called

  1. Lost Update

  2. uncommitted dependency

  3. infinite loop

  4. Deadlock

  5. With hold


Correct Option: D

Which of the following is TRUE about Primary Key?

  1. Same value of Primary Key can appear in more than one row in the table

  2. A Primary key defined column can be of type LONG

  3. A column that is defined as Primary Key cannot contain NULL value.

  4. Both A. and B.


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of a primary key.

A primary key is a column or a set of columns that uniquely identifies each row in a table. It helps maintain data integrity and ensures that there are no duplicate or null values in the primary key column(s).

Let's go through each option to understand why it is correct or incorrect:

Option A) Same value of Primary Key can appear in more than one row in the table - This option is incorrect because a primary key must have unique values for each row in the table. Having the same value of a primary key in more than one row would violate the uniqueness constraint of the primary key.

Option B) A Primary key defined column can be of type LONG - This option is incorrect because a primary key column cannot be of type LONG. The primary key column must have a data type that supports uniqueness and indexing, such as integer, character, or date types.

Option C) A column that is defined as Primary Key cannot contain NULL value - This option is correct. A primary key column cannot contain NULL values. NULL represents the absence of a value, and the primary key must have a value in order to uniquely identify each row in the table. Therefore, a primary key column must have a non-null value.

Option D) Both A. and B. - This option is incorrect because option A is incorrect. The same value of a primary key cannot appear in more than one row in the table.

The correct answer is C) A column that is defined as Primary Key cannot contain NULL value. This option is correct because a primary key column must have a non-null value.

- Hide questions