Computer Knowledge

Database and SQL

4,213 Questions

Master structured query language commands, database joins, table constraints, and alias generation. This section covers relational database management concepts and query outputs essential for technical aptitude. These technical questions feature prominently in banking IT officer exams and computer knowledge sections.

SQL queries and aliasesDatabase table constraintsDatabase joins and transformationsStored procedures and functions

Database and SQL Questions

Multiple choice technology databases
  1. It is NOT possible to switch unless no active transaction exists in UNDO1.

  2. It is possible to switch to UNDO2, but current active transactions will abort.

  3. It is possible to switch to UNDO2; current active transactions will be automatically migrated to UNDO2.

  4. It is possible to switch to UNDO2; only current active transactions will continue to execute inside UNDO1.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When switching undo tablespaces in Oracle, you can switch to a new undo tablespace while active transactions continue using the old one. Only new transactions will use the new undo tablespace. Active transactions will complete in UNDO1 until they finish or the undo tablespace is taken offline.

Multiple choice technology databases
  1. It is NOT possible to switch unless no active transaction exists in UNDO1.

  2. It is possible to switch to UNDO2, but current active transactions will abort.

  3. It is possible to switch to UNDO2; current active transactions will be automatically migrated to UNDO2.

  4. It is possible to switch to UNDO2; only current active transactions will continue to execute inside UNDO1.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When switching undo tablespaces, Oracle allows active transactions in the old undo tablespace (UNDO1) to complete normally. New transactions use UNDO2, but existing ones continue in UNDO1 until they commit or rollback. This is standard Oracle behavior - you don't need to wait for all transactions to complete before switching.

Multiple choice technology web technology
  1. Using lookup() function

  2. Using Generate Records component

  3. Using re_index() function

  4. Using next_in_sequence() function

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The next_in_sequence() function generates unique sequential numbers, which is the standard way to create surrogate keys in Ab Initio for maintaining unique identifiers across records.

Multiple choice technology web technology
  1. Inner Join

  2. Explicit Join ( record-required 0 = true, record-required 1 = true )

  3. Explicit Join ( record-required 0 = false, record-required 1 = true )

  4. Explicit Join ( record-required 0 = true, record-required 1 = false )

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Setting record-required 0 to false allows unmatched records from In0 to pass through (like a left outer join), while record-required 1 = true requires matches from In1. This gives all matching records plus unmatched In0 records.

Multiple choice technology databases
  1. Char >> number

  2. Char >> date

  3. Number >> varchar2

  4. Date >> varchar2

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

All options are valid implicit data type conversions in many database systems: Char can implicitly convert to number (when numeric string), Char to date (when in date format), Number to varchar2, and Date to varchar2. These conversions happen automatically without explicit CAST or CONVERT functions.

Multiple choice technology databases
  1. CONCAT

  2. MOD

  3. ROUND

  4. CONVERSION FUNCTION

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

All listed options are single-row functions in SQL: CONCAT (string concatenation), MOD (modulo operation), ROUND (numeric rounding), and conversion functions (TO_CHAR, TO_DATE, etc.) all operate on individual row values rather than aggregating across multiple rows like aggregate functions.

Multiple choice technology enterprise content management
  1. Continual Query Language

  2. Counted Query Language

  3. Continous Query Language

  4. None of the Above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

CQL stands for Continuous Query Language, which is used for querying real-time data streams. Since "Continuous Query Language" is misspelled as "Continous" in option 525784, "None of the Above" is correct.

Multiple choice technology web technology
  1. By using multiple <property> elements inside the <class> element.

  2. By using multiple <field> elements inside the <class> element.

  3. By using multiple <coulmn> elements inside the <class> element.

  4. none of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Hibernate mapping files, individual properties of a persistent class are mapped to table columns using multiple elements nested inside the element. Each element defines the column mapping, type, and other attributes for a single class property.