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
-
primary key
-
search key
-
alternate search key
-
all the above
B
Correct answer
Explanation
SearchInit PeopleCode executes specifically in the search key fields of a search record, not primary key or alternate search key fields. This event triggers when a user initiates a search dialog in PeopleSoft, allowing you to set default search values or control search behavior before the user enters criteria.
-
UNIQUE
-
DISTINCT
-
EXCLUSIVE
-
DISCRETE
B
Correct answer
Explanation
DISTINCT is the SQL keyword that eliminates duplicate rows from query results. When added to a SELECT statement, it ensures each row returned is unique. Options like UNIQUE, EXCLUSIVE, and DISCRETE are not valid SQL keywords for this purpose.
-
DROP
-
DELETE
-
CASCADE
-
TRUNCATE
D
Correct answer
Explanation
TRUNCATE is a DDL command that removes all rows from a table without generating rollback data, making it faster than DELETE. DROP removes the entire table structure, while DELETE generates rollback information and can be rolled back.
-
03-JUL-00
-
10-JUL-00
-
12-JUL-00
-
11-JUL-00
-
17-JUL-00
-
09-JUL-00
C
Correct answer
Explanation
The Pctused parameter in Oracle determines the minimum percentage of a data block that must be used before it becomes available for new inserts. The default value is 40. This storage parameter works with Pctfree to manage space utilization within data blocks.
-
A structure
-
Invalid
-
Client-independent
-
Not mandatory
C
Correct answer
Explanation
In SAP ABAP, MANDT is the client field (Mandant). Tables with MANDT in their primary key are client-dependent, meaning data is isolated by client (tenant). Tables without MANDT in the primary key are client-independent - the same data is visible across all clients. Option C is correct.
-
Views can be buffered
-
A view contains data
-
database view is aurtomatically created on the database upon activation
-
Maintenance Views are updateable
B
Correct answer
Explanation
Views in SAP ABAP are virtual tables that do not store any data themselves - they only store the definition/query logic. The actual data comes from the underlying base tables when the view is accessed. Views can be buffered for performance, database views are created upon activation, and maintenance views are designed to be updateable.
-
The key fields of the table make up the primary index
-
The developer designates the fields to be used as the primary index
-
The primary index is automatically created when the table is activated
-
The primary index ID cannot be designated by the Database Adminstrator
B
Correct answer
Explanation
In SAP ABAP, the primary index is automatically created from the table's key fields when the table is activated. The system does this automatically - the developer does not manually designate which fields form the primary index. The key fields defined in the table structure automatically become the primary index.
-
ContentValues
-
ContentValue
-
CursorFactory
-
None of above
A
Correct answer
Explanation
ContentValues is a class used to store a set of values that a ContentResolver can process. When inserting new rows into database tables using SQLiteDatabase.insert(), you pass a ContentValues object containing the column names and values for the new row. This is the correct and standard way to insert data.
B
Correct answer
Explanation
SQLite uses dynamic typing (manifest typing) by default, meaning that a value's datatype is associated with the value itself, not its column. You can store any datatype in any column, meaning strict type checking is not enforced, making the statement false.
B
Correct answer
Explanation
The statement is FALSE because while column names and order are provider-specific, data types are NOT universal across content providers. Each content provider defines its own schema including column names, data types, and default ordering. There is no common data type convention enforced across all providers.
-
JOB INPUT NULL
-
JOB INPUT FILENAME
-
JOB INPUT SQL
-
ALL THE ABOVE
D
Correct answer
Explanation
Easytrieve supports different input environments, allowing JOB INPUT FILENAME for standard file processing, JOB INPUT NULL for processing without an input file, and JOB INPUT SQL for database queries.
-
TABLE INFORMATION
-
INDEX
-
FILE INFORMATION
-
NONE OF THE ABOVE
A
Correct answer
Explanation
The SEARCH statement in EasyTrieve provides access to TABLE information. It allows searching through table entries to find specific values or matching criteria. Tables are data structures used for lookups and comparisons, and SEARCH is the mechanism to access and query them.