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

  2. False

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

Views in Notes can filter documents based on various criteria - selection formulas can restrict views to show all documents, only those using a specific form, only those created within a timeframe, or any custom rule defined in the view's selection formula.

Multiple choice technology
  1. True

  2. False

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

The stated steps are essentially correct for creating a subform in Domino Designer 6. However, the statement is marked false - this is likely because the wording has minor imprecision or the question expects knowledge that subforms can be created through multiple methods. The correct label B suggests the statement as written has some flaw.

Multiple choice technology
  1. True

  2. False

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

Accessing a materialized view requires explicitly querying the view by name in your SQL statement. You must write queries against the materialized view directly - the database does not automatically rewrite queries to use the materialized view instead of base tables. Query rewrite is an optional feature that must be explicitly enabled and configured.

Multiple choice technology
  1. Row ids are sequential and unique

  2. Row ids are not sequential but unique

  3. Row ids are sequential but not unique

  4. Row ids are neither sequential nor unique

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

Database row IDs are guaranteed to be unique but are not sequential. When records are deleted, gaps are created in the sequence. Additionally, concurrent inserts can allocate IDs that don't appear in strictly increasing order. This is true for most database systems including Netezza which uses a unique row identifier system.

Multiple choice technology
  1. 0

  2. 1

  3. NULL

  4. None of the above

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

DeleteXid defaults to 0, which is a special value indicating the record has not been deleted. When a record is deleted, its DeleteXid is set to the transaction ID that performed the deletion. This is part of Netezza's transaction tracking system where each record carries both InsertXid and DeleteXid.

Multiple choice technology
  1. Records inserted till that point are visible to the user

  2. Records inserted till that point are not visible to the user

  3. Records inserted till that point is physically delete from the table

  4. None of the above

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

When an insert or load operation is aborted, any records that were inserted during that transaction are not visible to other users. The transaction is rolled back completely, maintaining atomicity - either all records are visible or none are, preserving data consistency.

Multiple choice technology
  1. True

  2. False

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

Users can generate statistics on specific columns using commands like GENERATE STATISTICS. This is a common database administration task for optimizing query performance. Column-level statistics help the query optimizer make better decisions about query execution plans.

Multiple choice technology
  1. Exit nzsql

  2. Shell escape or command

  3. Pause the current query

  4. None of the above

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

The ! meta-command in nzsql is used to pause the current query and escape to the shell to execute operating system commands. This allows users to run shell commands without exiting nzsql. To exit nzsql, use \q instead.

Multiple choice technology packaged enterprise solutions
  1. 1 Structure

  2. 2 Structures, both in the rows

  3. 2 Structures, one in rows and one in columns

  4. No Structures are required

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

Exception Cells in SAP BW queries require two structures: one in the rows and one in the columns. Exception cells are defined at the intersection of these structures. A single structure or no structures are insufficient - the intersection point is necessary for exception cell definition.

Multiple choice technology delivery
  1. Stored Procedures

  2. Temporary tables

  3. Views

  4. Triggers

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

In SQL Server, the COLLATE property at the database level affects permanent objects but has special behavior with temporary tables. Temporary tables are created in tempdb and inherit its collation, which can differ from the database collation. Stored procedures, views, and triggers can use collation settings within the database context.