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 mainframe
  1. True

  2. False

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

SQL DATE, TIME, and TIMESTAMP data types are NOT accepted as character strings in COBOL programs. They must be declared using specialized SQL host variable declarations (like SQL DATE, SQL TIME, SQL TIMESTAMP) or converted using explicit date/time handling routines. Direct character string assignment would cause type mismatch errors.

Multiple choice technology mainframe
  1. True

  2. False

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

In Dynamic SQL, COMMIT or ROLLBACK does NOT destroy prepared statements. The prepared statement remains valid after transaction boundaries and can be reused without re-preparation. Only explicitly deallocation (via DEALLOCATE PREPARE) or session termination destroys the prepared statement.

Multiple choice technology platforms and products
  1. Create a task with single oracle enterprise stage that executes a custom SQL statement with FETCH ALL, that outputs to an Oracle enterprise stage.

  2. Create a job with three Oracle Enterprise stages to read from the tables and output to a collector stage which in turn outputs the data to an Oracle Enterprise stage.

  3. Create a job with a single Oracle Enterprise stage that executes a custom SQL statement with UNION ALL that outputs the data to an oracle enterprise stage.

  4. Create a job with three Oracle Enterprise stages to read from the tables and output to a Funnel stage which in turn outputs the data to an oracle enterprise stage.

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

Both using a single Oracle Enterprise stage with a custom UNION ALL SQL statement and using three Oracle Enterprise stages combined via a Funnel stage are valid ways to consolidate and load the regional data.

Multiple choice technology databases
  1. INDICES

  2. COLUMNS

  3. ROWS

  4. NONE OF THE ABOVE

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

A view is a virtual table that does not physically store data. While views contain columns and rows (from the underlying tables), they cannot contain indices directly - indices are created on base tables, not on views. Views inherit data access from their base tables' indices but cannot have their own indices.

Multiple choice technology programming languages
  1. Connection

  2. Command

  3. Parameter

  4. Error

  5. Field

  6. DSN

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

ADO (ActiveX Data Objects) has seven main objects: Connection, Command, Parameter, Recordset, Error, Field, and Property. The question lists five of these (Connection, Command, Parameter, Error, Field). DSN is a configuration string, not an ADO object.

Multiple choice technology enterprise content management
  1. Reference

  2. Child component

  3. Link

  4. Foreign key

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

In IBM Content Manager, auto-foldering is implemented through Link components, which automatically associate documents with appropriate folders based on predefined criteria. This eliminates the need for manual folder assignment and improves document organization efficiency.

Multiple choice technology
  1. candidate key

  2. surrogate key

  3. prerrogate key

  4. identity key

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

A surrogate key is an artificial identifier used as a primary key when no natural primary key exists or when the natural key is too complex. It's typically a system-generated unique number for each row, serving as a substitute for natural keys.