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 programming languages
  1. SELECT COUNT() FROM Persons

  2. SELECT COLUMNS() FROM Persons

  3. SELECT COLUMNS(*) FROM Persons

  4. SELECT COUNT(*) FROM Persons

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

COUNT(*) is the correct SQL aggregate function to return the number of records in a table. COUNT() without the asterisk is incomplete, and COLUMNS is not a valid aggregate function in SQL.

Multiple choice technology programming languages
  1. The enforced uniqueness of row in a table

  2. The enforced uniqueness of column in a table

  3. Ensuring that a foreign key attribute cannot be null

  4. The Enforced synchronization of primary key and foreign key values

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

Referential integrity ensures that relationships between tables remain consistent. It guarantees that a foreign key value either matches a valid primary key in the related table or is NULL, preventing orphaned records and maintaining valid data relationships across tables.

Multiple choice technology programming languages
  1. A processing loop to be initiated

  2. Provide access to any database fields

  3. Process the column values

  4. Returns the number of rows

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

The HISTOGRAM statement in Natural/Adabas performs two key functions: it initiates an automatic processing loop that iterates through each matching descriptor value (option A), and it populates the *NUMBER system variable with the count of occurrences or rows processed (option D). Options B and C are incorrect because HISTOGRAM is specifically for descriptor processing, not general field access or column value processing.

Multiple choice technology databases
  1. Insert

  2. Data driven

  3. Update

  4. Delete

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

The 'Data driven' option allows the mapping to handle both inserts and updates based on flags set in the data flow. When selected, Informatica uses the update strategy flags (DD_INSERT, DD_UPDATE, DD_DELETE) set within the mapping to determine the operation type for each row. This enables a single session to perform different DML operations dynamically.

Multiple choice technology databases
  1. Sorter transformation is more faster

  2. Order by clause on database is more faster

  3. Both will take same time

  4. We cannot compare

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

In Informatica PowerCenter, using a Sorter transformation can be faster because it utilizes the Integration Service's memory (cache) and parallel processing, avoiding database overhead and network roundtrips caused by database-level sorting via an 'ORDER BY' clause. However, performance varies based on database optimization, making the absolute claim debatable.

Multiple choice technology platforms and products
  1. Type

  2. Ranges

  3. Default Value

  4. Name

  5. Vault

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

In PLM systems, an attribute's data type is immutable after creation because it defines the storage format and validation rules. Changing the type would break existing data and database constraints. Ranges, default values, and names are typically modifiable, while Vault refers to storage location, not an attribute property.

Multiple choice technology platforms and products
  1. Duplicate Connection

  2. Floating the Connection

  3. Disconnecting the objects

  4. Revising the Connection

  5. Cloning the Objects

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

REPLICATE in Matrix relationships creates duplicate connections between objects, preserving the original while copying the link. Float (B) means independent modification, disconnect (C) breaks the relationship, revise (D) changes connection properties, and clone (E) duplicates objects, not connections.

Multiple choice technology platforms and products
  1. Duplicate Connection

  2. Floating the Connection

  3. Disconnecting the objects

  4. Revising the Connection

  5. Cloning the Objects

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

In ENOVIA Matrix relationship definitions, the REPLICATE property creates a duplicate connection between the same pair of objects. This allows multiple identical relationship instances to exist between the same source and target objects. Options B (floating), C (disconnecting), and D (revising) describe other relationship operations, while E (cloning objects) refers to object duplication, not relationship duplication.

Multiple choice technology platforms and products
  1. Type

  2. Ranges

  3. Default Value

  4. Name

  5. Vault

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

In Matrix/3DX PLM systems, an attribute's data type is locked at creation and cannot be changed later. This is a fundamental schema design principle - changing a type would break existing data and require database migration. Ranges, default values, and names can typically be modified through schema updates or admin tools without affecting the core data structure.