0

databases Online Quiz - 177

Description: databases Online Quiz - 177
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. Loaded table or partition

  2. Discard file of rejected records

  3. Summary report of errors encountered

  4. Updated system catalog table stats


Correct Option: D
Explanation:

To answer this question, the user needs to be familiar with the LOAD utility in database systems.

The LOAD utility is used to load data from external files into database tables. It is commonly used for bulk inserts of large amounts of data.

Now, let's go through each option to determine which one is not an output of the LOAD utility:

A. Loaded table or partition: This is a valid output of the LOAD utility. When the LOAD utility is successful, it loads data from external files into database tables or partitions.

B. Discard file of rejected records: This is a valid output of the LOAD utility. When the LOAD utility encounters records that cannot be loaded into the target table or partition, it writes those records to a discard file.

C. Summary report of errors encountered: This is a valid output of the LOAD utility. When the LOAD utility encounters errors while loading data, it generates a summary report of those errors.

D. Updated system catalog table stats: This is not an output of the LOAD utility. The LOAD utility is used for inserting data into tables, not updating system catalog table stats. The job of updating system catalog statistics falls under the responsibility of the database management system.

Therefore, the answer is:

The Answer is: D

  1. UNLOAD TABLE DSN1DB04.EMPTABSP

  2. UNLOAD TABLESPACE DSN1DB04.EMPTABSP

  3. UNLOAD DATABASE DSN1DB04.EMPTABSP

  4. UNLOAD DATABASE DSN1DB04 EMPTABSP


Correct Option: B
  1. True

  2. False


Correct Option: A
Explanation:

The correct answer is A) True.

When data is loaded into a database, indexes can be automatically built on the specified columns. Indexes help improve query performance by allowing the database engine to quickly locate the rows that satisfy the search criteria. By automatically building indexes during the loading process, the database system can optimize the performance of queries executed on the loaded data.

Therefore, the statement that indexes are built automatically during loading is true.

  1. a table is unloaded

  2. a table is loaded

  3. an index is created

  4. a table is reorganized


Correct Option: A
Explanation:

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) A table is unloaded - This option is correct. When a table is unloaded, there is no need to use RUNSTATS. Unloading a table means that the data is being removed from the table, and therefore, there is no data to collect statistics on.

Option B) A table is loaded - This option is incorrect. When a table is loaded, it is recommended to use RUNSTATS to collect statistics on the newly loaded data. This helps the database optimizer make better decisions when generating query plans.

Option C) An index is created - This option is incorrect. When an index is created, it is recommended to use RUNSTATS to collect statistics on the indexed columns. This helps the database optimizer make better decisions when using the index in query plans.

Option D) A table is reorganized - This option is incorrect. When a table is reorganized, it is recommended to use RUNSTATS to collect statistics on the reorganized table. This helps the database optimizer make better decisions when generating query plans for the reorganized table.

The correct answer is A) a table is unloaded. This option is correct because there is no need to use RUNSTATS when a table is unloaded, as there is no data to collect statistics on.

Therefore, the correct answer is option A.

  1. QUIESCE

  2. EXPLAIN

  3. REORG

  4. RUNSTATS


Correct Option: B
Explanation:

To answer this question, the user needs to have a basic understanding of database management systems and utilities used to manage databases.

QUIESCE is a utility used to temporarily halt the activity on the database, allowing for maintenance operations to take place. It is not used to obtain access path details.

EXPLAIN is a utility used to display the access path details for a particular SQL statement. This option is correct.

REORG is a utility used to reorganize the physical storage of a database table, and is not used to obtain access path details.

RUNSTATS is a utility used to collect statistical information about the data contained in a database table, and is not used to obtain access path details.

Therefore, the correct answer is:

The Answer is: B. EXPLAIN

  1. Triggering Table

  2. Triggering Event

  3. Triggered Action

  4. All the above


Correct Option: D
  1. Validate input data

  2. Automatically generate values for newly inserted rows

  3. support alerts

  4. To Implement Referential Integrity


Correct Option: D
  1. If transaction A holds X lock on row R, If transaction B requests for S lock, then B would go into wait state until A releases the lock

  2. If transaction A holds S lock on row R, If transaction B requests for S lock, then B would be granted the lock

  3. If transaction A holds X lock on row R, If transaction B requests for X lock,then B would be granted the lock.

  4. If transaction A holds S lock on row R, If transaction B requests for X lock, then B would be granted the lock


Correct Option: A,B
  1. Database

  2. Tablespace

  3. Table

  4. View


Correct Option: B,C
  1. Designates the values that columns of a table can contain

  2. The limiting of a set of foreign key values to a set of primary key values

  3. The limiting of a set of Primary key values to a set of foreign key values

  4. None of the above


Correct Option: B
  1. True

  2. False


Correct Option: A
Explanation:

A tablespace lock is the most restrictive type of lock in DB2. It prevents any other process from accessing any data in the tablespace. A page lock only prevents other processes from accessing the specific page that is locked.

Therefore, the statement "When acquiring Tablespace lock more data is restricted than page level Lock" is True.

A tablespace lock restricts access to all of the data in a tablespace, while a page lock only restricts access to a single page. This means that a tablespace lock is more restrictive than a page lock.

For example, if a tablespace contains 100 pages and a process acquires a tablespace lock on the tablespace, then no other process can access any of the data in the tablespace, even if the data is not on the page that is locked. However, if a process acquires a page lock on a single page in the tablespace, then other processes can still access the data on the other 99 pages in the tablespace.

In general, tablespace locks should only be used when it is absolutely necessary to prevent other processes from accessing any data in the tablespace. Page locks should be used whenever possible, as they provide a more granular level of locking and allow other processes to access more data.

  1. True

  2. False


Correct Option: B
Explanation:

A system catalog is a group of tables and views that incorporate important information about a database. It includes tables that contain information about schemas, tables, columns, users, and so forth. A database management system (DBMS) typically manages these system catalog tables, and they are used to maintain consistent and reliable database operations.

While it's technically possible to create triggers on regular tables in a database, system catalog tables are typically not allowed to have triggers. The system catalog tables are managed by the DBMS itself, and any modifications to these tables are tightly controlled to avoid inconsistency or corruption of the system catalog. Therefore, DBMSs usually restrict users from creating triggers on system catalog tables.

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

Option A) True - This option is incorrect because system catalog tables are managed by the DBMS, and it typically prevents users from creating triggers on these tables.

Option B) False - This option is correct because, as mentioned above, creating triggers on system catalog tables is usually not allowed.

The correct answer is B) False. This option is correct because creating triggers on system catalog tables is typically not permitted by the DBMS to prevent potential data inconsistencies or system corruption.

- Hide questions