Questions Related to databases

Multiple choice technology databases
  1. A. MERGE INTO <<target_table_name>> USING <<source_table_name>> WHEN MATCHED THEN UPDATE ------ WHEN NOT MATCHED THEN INSERT -------

  2. B. MERGE <<target_table_name>> USING <<source_table_name>> WHEN MATCHED THEN UPDATE ------ WHEN NOT MATCHED THEN INSERT -------

  3. C. MERGE INTO <<target_table_name>> USING <<source_table_name>> WHEN EXISTS THEN UPDATE ------

  4. D. MERGE INTO <<target_table_name>> USING <<source_table_name>> WHEN NOT MATCHED THEN INSERT ------

  5. Both A and D

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology databases
  1. A. You use a NEXTVAL pseudo column to look at the next possible value that would be generated from a sequence, without actually retrieving the value

  2. B. You use a CURRVAL pseudo column to look at the current value just Generated from a sequence, without affecting the further values to be generated from the sequence.

  3. You use a NEXTVAL pseudo column to obtain the next possible value from a sequence by actually retrieving the value from the sequence

  4. Both A and B

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology databases
  1. Use the DESCRIBE command in the EMP_DEPT VU view.

  2. Use the DEFINE VIEW command on the EMP_DEPT VU view

  3. Use the DESCRIBE VIEW command on the EMP_DEPT VU view

  4. Query the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology databases
  1. ALTER VIEW emp_dept_vu (ADD manager_id NUMBER);

  2. MODIFY VIEW emp_dept_vu (ADD manager_id NUMBER);

  3. ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department_id = d.department_id;

  4. CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology databases
    1. Bit map indexes are used on low-cardinality columns(having low distinct values) 2.B-tree indexes are most effective for high-cardinality data(only for unique columns)
  1. B-tree indexes cannot be used in environments typically have large amounts of data and ad hoc queries

  2. bitmap indexes can be created on partitioned tables

  3. All of the above

Reveal answer Fill a bubble to check yourself
D Correct answer