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

Multiple choice technology packaged enterprise solutions
  1. primary key

  2. search key

  3. alternate search key

  4. all the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology databases
  1. 20

  2. 30

  3. 40

  4. 50

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology packaged enterprise solutions
  1. A structure

  2. Invalid

  3. Client-independent

  4. Not mandatory

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology packaged enterprise solutions
  1. Views can be buffered

  2. A view contains data

  3. database view is aurtomatically created on the database upon activation

  4. Maintenance Views are updateable

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology packaged enterprise solutions
  1. The key fields of the table make up the primary index

  2. The developer designates the fields to be used as the primary index

  3. The primary index is automatically created when the table is activated

  4. The primary index ID cannot be designated by the Database Adminstrator

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology platforms and products
  1. ContentValues

  2. ContentValue

  3. CursorFactory

  4. None of above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology platforms and products
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology platforms and products
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. JOB INPUT NULL

  2. JOB INPUT FILENAME

  3. JOB INPUT SQL

  4. ALL THE ABOVE

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. TABLE INFORMATION

  2. INDEX

  3. FILE INFORMATION

  4. NONE OF THE ABOVE

Reveal answer Fill a bubble to check yourself
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.