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
-
database table
-
sql view
-
derived view
-
derived/work records
D
Correct answer
Explanation
Derived or work records are temporary, in-memory buffers in PeopleSoft used for display or processing purposes; they do not write to database tables. Consequently, database-level operations like RowDelete and RowInsert do not fire PeopleCode events for them, unlike physical tables or views.
-
on all the records of the currently active page
-
on the records present in the component buffer
-
on the record that is currently being processed
-
on all the records of the component
C
Correct answer
Explanation
The RowSelect PeopleCode event fires as each row is being processed during a row-by-row operation (like ScrollSelect). At this point, you can only refer to fields on the record currently being processed - you don't have access to all records in the buffer or component.
-
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
E
Correct answer
Explanation
The NEXT_DAY function returns the date of the first weekday named by char that is later than the date sysdate. Since July 10, 2000 is a Monday, the next Monday is exactly one week later, which is July 17, 2000.
A
Correct answer
Explanation
The query uses string concatenation operators to combine multiple columns into a single expression aliased as Adress. Regardless of how many columns are concatenated inside the expression, the SELECT clause projects only one resulting column.
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.
A
Correct answer
Explanation
Database queries in Android return data encapsulated in Cursor objects, which act as random-read pointers to rows within the query result set.
-
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.