Loading…
Loading…
Loading…
150 questions · 150 marks · 150 minutes · Official 2023 cutoff (General (50% Qualifying)): 75/150
| Section | Questions | Marks | Time | Est. Cutoff |
|---|---|---|---|---|
| Computer Science Domain | 100 | 100 | Composite | — |
| Art of Teaching & General Skills | 50 | 50 | Composite | — |
Solve these 5 preview questions right here, then attempt all 150 questions timed.
Select the correct option.
In SQL, which wildcard character used with the `LIKE` operator matches exactly ONE single character?
Correct Answer: (C) `_` (Underscore)
Concept & Exam Tag
Topic: SQL Pattern Matching | Asked in: KVS PGT CS 2023, DSSSB TGT CS 2021, Rajasthan Computer Teacher 2022
Explanation
In SQL, the LIKE operator uses two standard wildcard characters: % (percent) matches zero, one, or multiple characters; _ (underscore) matches exactly one single character. For example, 'S_mith' matches 'Smith' or 'Smyth', but not 'Smooth'.
Exam Tip
% = 0 or more characters. _ = exactly 1 character. Always used with LIKE, not with =.
Select the correct option regarding SQL aggregate behavior.
Suppose a table `Employees` has 10 rows, where the `Bonus` column has 7 numeric values and 3 `NULL` entries. What do `COUNT(*)` and `COUNT(Bonus)` evaluate to respectively?
Correct Answer: (B) 10 and 7
Concept & Exam Tag
Topic: SQL COUNT and NULL Values | Asked in: Bihar STET 2023, KVS PGT CS 2018, Rajasthan Computer Instructor 2022
Explanation
COUNT(*) counts the total number of rows in the table or result set, regardless of whether individual column values are NULL or duplicated. On the other hand, COUNT(column_name) ignores all NULL values and only counts rows where that specific column is NOT NULL. Thus, COUNT(*) yields 10 and COUNT(Bonus) yields 7.
Exam Tip
COUNT(*) includes NULLs and duplicates. COUNT(col) ignores NULLs. COUNT(DISTINCT col) ignores NULLs and duplicates.
Select the correct option.
What problem occurs when a transaction T2 reads a value written by another transaction T1 that has not yet committed, and T1 later aborts?
Correct Answer: (B) Dirty Read (Uncommitted Dependency)
Concurrency Anomalies
A Dirty Read occurs when T2 reads uncommitted data written by T1, and T1 subsequently rolls back, leaving T2 with invalid data.
Select the correct option.
Which SQL aggregate function returns the total number of non-NULL values in a specified column?
Correct Answer: (B) COUNT(column_name)
SQL Aggregates
COUNT(column_name) ignores NULL values in that column, whereas COUNT(*) counts all rows including those containing NULLs.
Select the correct option.
Which of the following ACID properties of database transactions guarantees that once a transaction has completed and committed, its updates will survive subsequent system crashes or power failures?
Correct Answer: (D) Durability
Concept & Exam Tag
Topic: Transaction Management & ACID Properties | Asked in: DSSSB TGT CS 2023, Bihar STET
Explanation
Durability guarantees that once a transaction commits, the changes are permanent and cannot be lost even in the event of a system crash, operating system crash, or power failure. This is typically implemented via Write-Ahead Logging (WAL) and non-volatile storage.
Exam Tip
ACID Summary: Atomicity = All or nothing (Recovery Manager); Consistency = Integrity constraints preserved (Application & DB); Isolation = Concurrent execution without interference (Concurrency Control Manager); Durability = Committed updates are persistent (Log Manager/WAL).