IBPS Clerk Computer – Database Basics and SQL – Exam-Level Drill · Mains Level

← Back

IBPS Clerk Computer – Database Basics and SQL – Exam-Level Drill · Mains Level – 10 questions, subject: Computer Aptitude. Every question has the correct answer with a two-line explanation; tap "Show Answer". Free practice for IBPS Clerk, IBPS PO, SBI, RRB exams – Shanmugam IAS Academy, Coimbatore.

Get daily current affairs & exam alerts – follow us YouTube WhatsApp Channel Telegram Channel Facebook Page Instagram
Share with friends & study groups
Link to this page from your website / blog (HTML code)
1.  

Directions: The next 6 questions are based on the table LOAN (Rate is in % per annum; NULL = not yet fixed):

LoanID Branch Kind Amount Rate
L1 Salem Home 2500000 8
L2 Erode Gold 150000 9
L3 Salem Gold 90000 NULL
L4 Karur Car 600000 10
L5 Erode Home 1800000 8
L6 Salem Car 450000 NULL
SELECT COUNT(Rate) FROM LOAN; returns:

Correct Answer: E [4]

Explanation:

COUNT(column) counts only non-NULL values, and the Rate column has 2 NULLs (L3 and L6) out of 6 rows, so COUNT(Rate) = 6 - 2 = 4. COUNT(*) would return 6 because it counts every row.

2.  
SELECT LoanID FROM LOAN WHERE Rate IS NULL OR Amount BETWEEN 150000 AND 600000 ORDER BY LoanID; returns:

Correct Answer: C [L2, L3, L4, L6]

Explanation:

Rate NULL: L3, L6. BETWEEN (inclusive) 150000–600000: L2, L4, L6 → L2, L3, L4, L6.

3.  
A teller must be allowed to read the table ACC but not change it. Which statement should the DBA run?

Correct Answer: D [GRANT SELECT ON ACC TO teller1;]

Explanation:

GRANT SELECT ON ACC TO teller1 gives only read permission on the table, which is exactly what the teller needs. GRANT UPDATE would allow changes, and REVOKE SELECT would take away even the right to read.

4.  
Consider the following statements about SQL commands:
I. ALTER, DROP and RENAME are DDL commands.
II. ROLLBACK and SAVEPOINT are DCL commands.
III. INSERT, UPDATE and DELETE are DML commands.
Which of the statements given above is/are correct?

Correct Answer: C [Only I and III]

Explanation:

Statements I and III are correct: ALTER, DROP and RENAME are DDL commands, while INSERT, UPDATE and DELETE are DML commands. Statement II is wrong because ROLLBACK and SAVEPOINT are TCL (Transaction Control Language) commands; DCL means GRANT and REVOKE.

5.  
Match the ACID property with its meaning:
List I: (a) Atomicity; (b) Consistency; (c) Isolation; (d) Durability
List II: (1) all or nothing; (2) valid state to valid state; (3) committed changes survive failures; (4) no interference between concurrent transactions

Correct Answer: E [a-1, b-2, c-4, d-3]

Explanation:

Atomicity means all or nothing (1), Consistency means moving from one valid state to another (2), Isolation means no interference between concurrent transactions (4) and Durability means committed changes survive failures (3), giving a-1, b-2, c-4, d-3. Together they are the ACID properties of a transaction.

6.  
Match the ER symbol with what it represents:
List I: (a) Rectangle; (b) Diamond; (c) Dashed ellipse; (d) Double ellipse
List II: (1) entity set; (2) derived attribute; (3) multi-valued attribute; (4) relationship set

Correct Answer: B [a-1, b-4, c-2, d-3]

Explanation:

In an ER diagram a rectangle shows an entity set, a diamond a relationship set, a dashed ellipse a derived attribute and a double ellipse a multi-valued attribute, giving a-1, b-4, c-2, d-3. A plain ellipse shows a simple attribute.

7.  
In a table ORDERS(OrderNo, ItemNo, ItemName, Qty) the primary key is (OrderNo, ItemNo) and ItemName depends only on ItemNo. The table is not in:

Correct Answer: A [2NF, because of a partial dependency]

Explanation:

ItemName depends on ItemNo alone, which is only part of the composite key (OrderNo, ItemNo), so this is a partial dependency and the table is not in 2NF. Putting ItemNo and ItemName in a separate ITEM table fixes it.

8.  
In a table ACCOUNT(AccNo, BranchCode, BranchCity) with primary key AccNo, BranchCity depends on BranchCode. This is a:

Correct Answer: C [transitive dependency (breaks 3NF)]

Explanation:

Here AccNo determines BranchCode and BranchCode determines BranchCity, so a non-key attribute depends on another non-key attribute: a transitive dependency that breaks 3NF. Moving BranchCode and BranchCity into a separate BRANCH table removes it.

9.  
Table R has 7 rows and 4 columns; table S has 5 rows and 3 columns. Their Cartesian product (CROSS JOIN) has:

Correct Answer: D [35 rows and 7 columns]

Explanation:

In a Cartesian product (CROSS JOIN) the rows multiply and the columns add, so R x S has 7 x 5 = 35 rows and 4 + 3 = 7 columns. Every row of R is paired with every row of S.

10.  
Consider the following statements:
I. WHERE is applied before GROUP BY, and HAVING after it.
II. An aggregate function such as COUNT(*) can be used directly in a WHERE clause.
III. COUNT(*) counts rows even when some columns contain NULL.
Which of the statements given above is/are correct?

Correct Answer: B [Only I and III]

Explanation:

Statement I is correct because WHERE filters rows before grouping and HAVING filters groups after GROUP BY, and III is correct because COUNT(*) counts every row even when columns hold NULL. Statement II is wrong: aggregate functions cannot be used directly in WHERE; they belong in HAVING.

📘 IBPS Clerk 2026 – B4 Computer Aptitude (PDF book)
Here you get the answer with a one-line explanation. 690 questions, each with a full step-by-step explanation · shortcuts, tables, trap alerts · Prelims + Mains sectional mocks. All 5 books together: ₹599.
Get the book – ₹149 →
Score: 0 Answered: 0 / 0