0

databases Online Quiz - 191

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

Which of the following tools can NOT be used to catalog a database?

  1. Control Center

  2. SQL Assist

  3. Configuration Assistant

  4. Command Line Processor


Correct Option: B

Which type of key is defined on the child table to implement a referential constraint?

  1. Primary key

  2. Unique key

  3. Foreign key

  4. Composite key


Correct Option: A

Which of the following DB2 data types does NOT have a fixed length?

  1. INT

  2. CHAR

  3. XML

  4. DOUBLE


Correct Option: C

Which of the following DB2 data types can be used to store 1000MB of single-byte character data?

  1. BLOB

  2. CLOB

  3. DBCLOB

  4. GRAPHIC


Correct Option: B

Which of the following isolation levels will lock all rows scanned to build a result data set?

  1. Uncommitted Read

  2. Cursor Stability

  3. Read Stability

  4. Repeatable Read


Correct Option: D

AI Explanation

To answer this question, we need to understand the concept of isolation levels and how they affect locking behavior in a database system.

Isolation levels determine the degree to which one transaction is isolated from the effects of other concurrent transactions. They control how locks are acquired and released on data during a transaction.

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

Option A) Uncommitted Read - This option is incorrect because the Uncommitted Read isolation level allows a transaction to read uncommitted changes made by other transactions. However, it does not lock the rows scanned to build a result data set.

Option B) Cursor Stability - This option is incorrect because the Cursor Stability isolation level allows a transaction to hold locks on rows that are being accessed via a cursor. However, it does not lock all rows scanned to build a result data set. It only locks the rows being accessed through the cursor.

Option C) Read Stability - This option is incorrect because the Read Stability isolation level allows a transaction to acquire read locks on the data it accesses. These read locks prevent other transactions from modifying the data. However, it does not lock all rows scanned to build a result data set. It only locks the rows accessed by the transaction.

Option D) Repeatable Read - This option is correct because the Repeatable Read isolation level locks all rows scanned to build a result data set. It ensures that other transactions cannot modify or delete the rows that are being scanned by the transaction. This level of isolation provides a higher degree of data integrity but can result in increased locking and potential deadlock situations.

The correct answer is D) Repeatable Read. This option is correct because it locks all rows scanned to build a result data set, ensuring data integrity and preventing other transactions from modifying the rows during the transaction.

  1. Enterprise reverse planning

  2. Enterprise revenue Planning

  3. Effective resource planning

  4. Enterprise resource planning


Correct Option: D

Q2

  1. It is a KeyFlex field used to store different segment values.

  2. It will store attribute values that will be used to track future requirements.

  3. knowledge Flex Field

  4. It is containing of one segment


Correct Option: A

Q6

  1. True

  2. False


Correct Option: B

Q4

  1. True

  2. False


Correct Option: B

Q8

  1. List of Values with validation.

  2. Storing varchar Data.

  3. Storing number Data.

  4. List of Value.


Correct Option: A

Q9

  1. Explicity fired.

  2. Not taking space in database.

  3. Only DML triggers are there.

  4. Trigger timing is mandatory.


Correct Option: D

Q10

  1. To insert in a view.

  2. To insert in a view which is created with more than one table.

  3. To insert into read only view.

  4. None.


Correct Option: B

Q5

  1. IN,OUT

  2. OUT,OUT

  3. IN ,IN

  4. OUT,IN


Correct Option: B

Q7

  1. Descriptive Flow Field.

  2. Descriptive Flex Field.

  3. Descriptive Flow File.

  4. Descriptive Flex File.


Correct Option: B

Q3

  1. Form->Function->User->Menu->Responsibility

  2. Form->Menu->Function->Responsibility->User

  3. Form->Function->Menu->Responsibilty->User

  4. Form->Function->User->Menu->Responsibilty


Correct Option: C

Q2

  1. It is a KeyFlex field used to store different segment values.

  2. It will store attribute values that will be used to track future requirements.

  3. knowledge Flex Field

  4. It is containing of one segment


Correct Option: A

Which two statements accurately describe a role? (Choose two.)

  1. A role can be given to a maximum of 1000 users

  2. A user can have access to a maximum of 10 roles

  3. A role can have a maximum of 100 privileges contained in it.

  4. Privileges are given to a role by using the CREATE ROLE statement

  5. A role is a named group of related privileges that can be granted to the user

  6. A user can have access to several roles, and several users can be assigned the same role


Correct Option: E,F

What is necessary for your query on an existing view to execute successfully

  1. The underlying tables must have data

  2. You need SELECT privileges on the view

  3. The underlying tables must be in the same schema

  4. You need SELECT privileges only on the underlying tables


Correct Option: B

Evaluate these two SQL statements: SELECT last_name, salary , hire_date FROM EMPLOYEES ORDER BY salary DESC; SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC; What is true about them

  1. The two statements produce identical results.

  2. The second statement returns a syntax error

  3. There is no need to specify DESC because the results are sorted in descending order by default

  4. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.


Correct Option: A
Explanation:

To understand these SQL statements, the user needs to know the basic syntax of the SELECT statement and the ORDER BY clause. The SELECT statement retrieves data from one or more tables, and the ORDER BY clause sorts the results in ascending or descending order based on one or more columns' values.

The first SQL statement retrieves the last_name, salary, and hire_date columns from the EMPLOYEES table and sorts the results in descending order based on the salary column's values.

The second SQL statement retrieves the last_name, salary, and hire_date columns from the EMPLOYEES table and sorts the results in descending order based on the second column, which is the salary column.

A. The two statements produce identical results. This is correct because both statements retrieve the same columns and sort the results in descending order based on the salary column's values.

B. The second statement returns a syntax error. This is incorrect because the second SQL statement is syntactically correct and will execute without errors.

C. There is no need to specify DESC because the results are sorted in descending order by default. This is incorrect because the default order is ascending, not descending. If the user wants to sort the results in descending order, they must specify DESC explicitly.

D. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement. This is incorrect because adding a column alias does not affect the sorting order. The two statements already produce identical results, so there is no need to modify them.

Therefore, the answer is: A. The two statements produce identical results.

You would like to display the system date in the format "Monday, 01 June, 2001". Which SELECT statement should you use?

  1. SELECT TO_DATE(SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;

  2. SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month, 'YYYY') FROM dual;

  3. SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;

  4. SELECT TO_CHAR(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;

  5. SELECT TO_DATE(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;


Correct Option: C
Explanation:

To solve this question, the user needs to know the basic SQL functions like TO_CHAR and SYSDATE and their usage and format masks.

Option A: This option is incorrect because it uses the wrong format mask and does not give the required output format. The 'FMDAY' format mask is not correct to get the desired output format.

Option B: This option is incorrect because it uses the wrong format mask and does not give the required output format. The 'FMDD' format mask is not correct to get the desired output format.

Option C: This option is correct. It uses the correct format mask and gives the required output format. The 'FMDay' format mask gives the day of the week in the full name format and 'DD Month, YYYY' gives the date in the required format.

Option D: This option is incorrect because it uses the wrong format mask and does not give the required output format. The 'FMDY' format mask is not correct to get the desired output format.

Option E: This option is incorrect because it uses the wrong function and format mask. TO_DATE function is used to convert a string to a date, not to format the date. Additionally, 'DDD' format mask is not required to get the desired output format.

Therefore, the answer is:

The Answer is: C. SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;

- Hide questions