Tag: databases

Questions Related to databases

  1. CALL ‘CBLTDLI’ USING PARM-COUNT, FUNC-CODE, DB-PCB-MASK, IO-AREA, SSA-LIST.

  2. CALL ‘CBLTDLI’ USING FUNC-CODE, DB-PCB-MASK, IO-AREA.

  3. CALL ‘CBLTDLI’ USING FUNC-CODE, DB-PCB-MASK, SSA-LIST.

  4. CALL ‘CBLTDLI’ USING FUNC-CODE, DB-PCB-MASK, IO-AREA, SSA-LIST.


Correct Option: C

How can you ensure that the memory allocated by an object is freed?

  1. By invoking the free method on the object

  2. By calling system.gc() method

  3. By setting all references to the object to new values (say null).

  4. Garbage collection cannot be forced. The programmer cannot force the JVM to free the memory used by an object.


Correct Option: D
Explanation:

The correct answer is D. Garbage collection cannot be forced. The programmer cannot force the JVM to free the memory used by an object. The JVM will automatically free the memory used by an object when it is no longer referenced by any other object.

Option A is incorrect because there is no free method in Java.

Option B is incorrect because calling system.gc() only requests the JVM to run the garbage collector, but it does not guarantee that the garbage collector will actually free the memory used by the object.

Option C is incorrect because setting all references to the object to new values (say null) will only prevent the JVM from garbage collecting the object, but it will not actually free the memory used by the object.

The memory used by an object will only be freed when the object is no longer referenced by any other object. This is the principle of garbage collection.

  1. cookies

  2. hidden form fields

  3. SSL sessions

  4. All of the above


Correct Option: D
  1. IMS act as the resource manager when DB2 program is invoked from IMS

  2. Commits and rollbacks are performed using COMMIT and ROLLBACK Commands

  3. DB2 can be invoked from IMS using IMS-DB2 attachment facility

  4. DB2 Subsystem and plan name are DSNMTV01 in DD


Correct Option: B

Which one of the following library type is used in DLI jobs to dynamically allocate database clusters?

  1. PSBLIB

  2. DBDLIB

  3. ACBLIB

  4. USERLIB


Correct Option: D
  1. The number of CPUs on the server

  2. The degree of parallelism on the tables

  3. The use of bitmap indexes

  4. The quality of the SQL optimization


Correct Option: D
  1. Removal of data redundancy

  2. The introduction of data redundancy

  3. The introduction of non-first normal form relations

  4. The introduction of SQL*Plus


Correct Option: B
  1. They indicate an optimized execution plan.

  2. They may be able to be tuned to use an index

  3. The full-table scan should be normalized from the database design

  4. A full-table scan is always sub-optimal.


Correct Option: B
Explanation:

To answer this question, the user needs to understand the basics of SQL tuning and database optimization.

The correct answer is:

B. They may be able to be tuned to use an index

Explanation:

A full-table scan is a process in which the database engine reads all the rows of a table to find the relevant data. This can be a time-consuming process, especially for large tables. Full-table scans are not always sub-optimal, but they can be inefficient if the table is not properly indexed. When a table is not indexed correctly, the database engine must read every row of the table to find the relevant data, even if only a small subset of the data is needed.

Therefore, searching for full-table scans is critical to SQL tuning because it allows a database administrator to identify tables that are not properly indexed. Once identified, the administrator can then tune the full-table scan to use an index, which can improve performance and reduce the time it takes to retrieve the data.

Option A is incorrect because a full-table scan does not indicate an optimized execution plan. It may be the only option available, but it is not necessarily optimized.

Option C is incorrect because a full-table scan is not something that should be normalized from the database design. It is a method of retrieving data from a table and can be optimized through proper indexing.

Option D is incorrect because a full-table scan is not always sub-optimal. It depends on the size of the table and how well it is indexed.