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
-
Local List
-
Field Value
-
Remote List
-
Prompt List
B
Correct answer
Explanation
For frequently changing short-to-medium lists, Field Value should be specified in the TableEdit tab. Field Values are designed for dynamic list management that changes often, unlike Local Lists or Prompt Lists which are more static.
-
convert input data to a standard format
-
test prperty values
-
perform a database INSERT
-
define and enforce comparison relationships among property values
A
Correct answer
Explanation
Edit Input rules (Rule-Edit-Input) are used to convert input data into a standard format. They normalize user input before processing. They are not used for testing property values, database operations, or enforcing comparison relationships.
-
Database Save
-
Database Update
-
Database Deletion
-
All of the above
D
Correct answer
Explanation
Trigger rules in Pega are declarative rules that automatically execute processing when specific database operations occur. They can be configured to run on save (create), update, or delete operations, making 'All of the above' the correct answer.
-
Local List
-
Field Value
-
Remote List
-
Prompt List
B
Correct answer
Explanation
For short to medium-sized lists that change frequently, the TableEdit tab should specify 'Field Value' as the source. Field Values allow easy addition, modification, and removal of list entries without code changes. Option A (Local List) is for hardcoded lists, option C (Remote List) is for external data sources, and option D (Prompt List) is for dynamic prompts. Field Value (B) is the best choice for frequently changing short/medium lists.
-
Database Save
-
Database Update
-
Database Deletion
-
All of the above
D
Correct answer
Explanation
A Rule-Declare-Trigger is executed automatically by the Pega engine when an instance of a specified class is saved (inserted/updated) or deleted in the database, making all of the database events trigger sources.
-
a. Decision Tree
-
b. Map Value
-
c. When
-
d. Decision Table
-
e. Property
C,E
Correct answer
Explanation
Quick Create supports When rules and Property rules. Decision Trees, Decision Tables, and Map Values require the full rule form and cannot be created via Quick Create.
-
a. PC_Work
-
b. PC_Other
-
c. PC_PolAdmin
-
d. Base Table
C
Correct answer
Explanation
Classes inherit table mapping from their parent class. Policy-Admin-Work maps to PC_PolAdmin table, so any class created under it (like Policy-Admin-Work-MyClass) will also map to PC_PolAdmin.
-
Declare Expressions
-
Declare Constraint
-
Declare Trigger
-
Declare OnChange
D
Correct answer
Explanation
Declare OnChange is specifically designed to execute activities when a property value changes. Declare Expressions (A) compute derived property values. Declare Constraint (B) validates property relationships. Declare Trigger (C) doesn't exist as a standard Pega declarative rule type.
-
Create a database
-
Delete a database
-
Add a single row
-
Delete a row
-
Add multiple rows
-
Delete multiple rows?
-
List View
-
Summary View
-
Both a and b
-
none of the above
B
Correct answer
Explanation
Summary View in PRPC provides the group by functionality for aggregating and organizing data. List View displays individual records without grouping capabilities. The group by option is specifically available when you switch to Summary View to create aggregated reports.
-
A view can be created as read only.
-
A view can be created as a join on two or more tables. AND Insert and delete operations cannot be performed on views using functions
-
A view cannot have an ORDER BY clause in the SELECT statement.
-
A view cannot be created with a GROUP BY clause in the SELECT statement.
-
Both tables have NULL values.
-
You want all unmatched data from one table.
-
You want all matched data from both tables.
-
You want all unmatched data from both tables.
-
One of the tables has more data than the other.
D
Correct answer
Explanation
FULL OUTER JOIN returns ALL matched AND unmatched data from BOTH tables. It combines the results of both LEFT OUTER JOIN and RIGHT OUTER JOIN. Option D is correct - it returns all unmatched data from both tables (along with matched data).
-
TRUNCATE is a DDL command whereas DELETE is a DML command
-
TRUNCATE is much faster than DELETE
-
In case of TRUNCATE ,Trigger doesn't get fired.But in DML commands like DELETE .Trigger get fired
-
All of the above
-
TRUNCATE is a DDL command whereas DELETE is a DML command
-
TRUNCATE is much faster than DELETE
-
In case of TRUNCATE ,Trigger doesn't get fired.But in DML commands like DELETE .Trigger get fired
-
All of the above
-
USER_TAB_PRIVS_MADE
-
USER_TAB_PRIVS_RECD
-
USER_COL_PRIVS_MADE
-
USER_COL_PRIVS_RECD
D
Correct answer
Explanation
USER_COL_PRIVS_RECD shows column-level object privileges that the current user has RECEIVED. The other options show different privilege views: USER_TAB_PRIVS_MADE (table privileges granted to others), USER_TAB_PRIVS_RECD (table privileges received), USER_COL_PRIVS_MADE (column privileges granted to others).