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
  1. 8, 8

  2. 120, 8

  3. 960, 8

  4. 960, 120

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Natural join on Student and Enroll (sharing 'rollno'): Max tuples occur if every student is enrolled in all 8 courses (120 * 8 = 960). Min tuples occur if only the students present in Enroll are joined (8).

Multiple choice
  1. Attributes

  2. Atomicity

  3. Both (1) and (2)

  4. None of above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Atomicity means 'all or nothing'  and 'may be all or nothing' in the transaction. ACID stands for ' Atomicity Consistency Isolation Durability '.

Multiple choice
  1. Projection, selection and joining

  2. Updating the data

  3. Inserting new data in the tables

  4. Deleting data from tables

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Projection is used to choose the columns in a table that you want, returned by your query. Selection is used to choose the rows in a table that you want, returned by a query. Joining is used to join different tables by creating logic between them.

Multiple choice
  1. tables

  2. programs

  3. actions

  4. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Decision tables are a structured way to represent complex logic by mapping specific conditions to the corresponding actions that should be taken.

Multiple choice
  1. Commit

  2. Rollback

  3. Savepoint

  4. All of these

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Savepoint, commit, rollback, set transaction are TCL statements meaning Transaction Control statements which are used to manage the changes made by DML statements.  Savepoint , commit , rollback , set transaction are TCL statements meaning Transaction Control statements which are used to manage the changes made by DML statements. finally 5 option is correct.

Multiple choice
  1. Delete

  2. Look-up

  3. Insert

  4. None of above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To modify a record, one must first locate or look up the specific record in the database. Without finding the record first, you cannot perform a modification.

Multiple choice
  1. fields & columns

  2. rows & columns

  3. rows & cells

  4. None of above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In database terminology, a table (or relation) is composed of rows (tuples) and columns (attributes). Fields are synonymous with columns, but rows and columns is the standard definition for a table structure.