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
-
PSFIELD
-
PSRECFIELD
-
PS_DBFIELD
-
PSDBFIELD
D
Correct answer
Explanation
In PeopleSoft, PSDBFIELD is the system catalog table that stores the definitions of all fields used to create page controls and database columns.
-
SYSTEM CATALOG
-
PEOPLETOOLS TABLES
-
APPLICATION TABLES
-
PEOPLETOOLS CATALOG
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.
-
Application server
-
Web server
-
Batch server
-
None
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.
-
Setting %Date as constant
-
Required
-
Specifying Default using Record and Field values
-
Reasonable date
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.
-
PS_RECORDNAME
-
SYSRECORDNAME
-
PS$RECORDNAME
-
PSRECORDNAME
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_'.
-
Validates a field for Data to be entered on save of search dialog.
-
Allows to edit the search key.
-
Searches Edit fields for some values.
-
Option available only for Alternate Search Keys
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.
-
Commit
-
Cursors
-
savepoint
-
truncate
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.
-
Union All
-
Distinct
-
Unique
-
Intersect
D
Correct answer
Explanation
The INTERSECT operator in SQL automatically sorts the final result set to eliminate duplicates and find common rows. UNION ALL, DISTINCT, and UNIQUE do not inherently guarantee sorted order.
-
Union
-
Intersect
-
Minus
-
None of above
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.
-
Order by
-
Having
-
Group by
-
Where
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.
-
Commit
-
Drop
-
Truncate
-
All of above
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.
-
01-Jan-08
-
22-Sep-08
-
01-Sep-08
-
None of above
-
Not Null
-
Check
-
Unique key
-
All of above
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.
-
java
-
sql
-
plsql
-
All of above
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.
-
It process tuples one by one
-
It can be used in PLSQL
-
It can use SET operators
-
None of above
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.