Computer Knowledge

Database and SQL

3,929 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 packaged enterprise solutions
  1. SYSTEM CATALOG

  2. PEOPLETOOLS TABLES

  3. APPLICATION TABLES

  4. PEOPLETOOLS CATALOG

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

PeopleSoft Application definitions (records, pages, menus, etc.) are stored in PeopleTools tables, which are system tables that store metadata about application objects. Application Tables store actual business data, and System Catalog is a database-specific concept.

Multiple choice technology packaged enterprise solutions
  1. Application server

  2. Web server

  3. Batch server

  4. None

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

Application data is cached on the Application server to improve performance. This cache reduces database hits by storing frequently accessed data in memory. Web servers handle HTTP requests, and Batch servers process background jobs.

Multiple choice technology packaged enterprise solutions
  1. Setting %Date as constant

  2. Required

  3. Specifying Default using Record and Field values

  4. Reasonable date

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

The Reasonable Date property validates that dates are within an acceptable range (like not more than 30 days from current date). It prevents users from entering unrealistic dates. Required, Default, and Constant settings don't perform this date range validation.

Multiple choice technology packaged enterprise solutions
  1. PS_RECORDNAME

  2. SYSRECORDNAME

  3. PS$RECORDNAME
  4. PSRECORDNAME

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

PeopleSoft uses the prefix 'PS' followed directly by the record name (e.g., PSRECORDNAME) for its internal system tables, distinguishing them from application tables which use 'PS_'.

Multiple choice technology packaged enterprise solutions
  1. Validates a field for Data to be entered on save of search dialog.

  2. Allows to edit the search key.

  3. Searches Edit fields for some values.

  4. Option available only for Alternate Search Keys

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

Selecting the 'Search Edit' property on a PeopleSoft record field forces the system to validate the data entered in that field when the search dialog is saved or executed.

Multiple choice technology databases
  1. Commit

  2. Cursors

  3. savepoint

  4. truncate

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

Cursors are not part of core SQL - they are part of procedural SQL extensions like PL/SQL (Oracle) or T-SQL (Microsoft). COMMIT, SAVEPOINT, and TRUNCATE are all standard SQL commands for transaction control and data definition respectively.

Multiple choice technology databases
  1. Union

  2. Intersect

  3. Minus

  4. None of above

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

Set operations UNION, INTERSECT, and MINUS (or EXCEPT) all have equal precedence in SQL. They are evaluated left to right when chained together. None of them has higher priority than the others, making 'None of above' the correct answer.

Multiple choice technology databases
  1. Order by

  2. Having

  3. Group by

  4. Where

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

In standard SQL, a subquery cannot have an ORDER BY clause when used in contexts where a set operation is expected (like WHERE, HAVING, or as a derived table). The ORDER BY would only apply to the outer query. However, this is context-dependent - some modern SQL implementations allow ORDER BY in subqueries with LIMIT/OFFSET.

Multiple choice technology databases
  1. Commit

  2. Drop

  3. Truncate

  4. All of above

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

All three operations end a user transaction. COMMIT explicitly ends the transaction by saving changes. DROP and TRUNCATE are DDL operations that implicitly commit the current transaction and start a new one in most databases (Oracle, PostgreSQL). Therefore 'All of above' is correct.

Multiple choice technology databases
  1. Not Null

  2. Check

  3. Unique key

  4. All of above

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

Unique key constraints require an index to enforce uniqueness efficiently. NOT NULL constraints and CHECK constraints do not require indexes - they're validation rules. Therefore, only unique keys (C) mandatorily require an index.

Multiple choice technology databases
  1. java

  2. sql

  3. plsql

  4. All of above

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

Modern databases support multiple procedural languages. SQL runs natively. PL/SQL (Oracle's procedural extension) runs within Oracle databases. Java can run inside databases via Java Stored Procedures (Oracle JVM, SQL Server CLR, etc.). So all three (D) are correct.

Multiple choice technology databases
  1. It process tuples one by one

  2. It can be used in PLSQL

  3. It can use SET operators

  4. None of above

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

SQL is a set-oriented language because it operates on entire sets of data (relations) at once, rather than processing individual records or tuples one by one like procedural languages.