Loading…
Loading…
Loading…
150 questions · 150 marks · 150 minutes · Estimated cutoff: 101/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.
Which Transaction Control Language (TCL) command is used to set a checkpoint within a transaction, allowing partial rollback up to that specific point without canceling preceding statements?
Correct Answer: (C) `SAVEPOINT`
Concept & Exam Tag
Topic: Transaction Control (TCL) | Asked in: Bihar STET 2023, Rajasthan Computer Teacher 2022, DSSSB PGT CS 2021
Explanation
The SAVEPOINT statement creates an intermediate marker or savepoint within a transaction. A developer can subsequently use ROLLBACK TO savepoint_name to undo changes made after that savepoint while preserving the operations executed prior to it. COMMIT makes all changes permanent.
Exam Tip
TCL commands: COMMIT (permanently save), ROLLBACK (undo all), SAVEPOINT (partial rollback marker), SET TRANSACTION (set properties like read-only/isolation).
Select the correct option.
Which type of SQL JOIN returns all rows from the left table and the matched rows from the right table, filling unmatched right-side columns with NULL?
Correct Answer: (B) LEFT OUTER JOIN
SQL Joins
LEFT OUTER JOIN (or LEFT JOIN) preserves every row of the left relation and places NULL in right-relation attributes when no match exists.
Select the correct option.
Given a table `Employees` with a column `Commission` containing values: `100, 200, NULL, 300`. What is the result returned by `SELECT COUNT(Commission) FROM Employees;`?
Correct Answer: (B) 3
Concept & Exam Tag
Topic: SQL Aggregate Functions & NULLs | Asked in: UK LT Grade 2021, Bihar STET 2024
Explanation
In SQL, all aggregate functions (SUM, AVG, MIN, MAX, COUNT(col)) ignore NULL values during computation. COUNT(Commission) counts non-NULL entries only, which is 3. Only COUNT(*) counts all rows including NULLs (returning 4).
Exam Tip
COUNT(col) ignores NULLs -> 3. COUNT(*) counts all rows -> 4. AVG(Commission) = (100 + 200 + 300) / 3 = 200 (divided by 3, NOT 4).
Select the correct option.
In relational algebra, which operation is a derived operator built from Cartesian product and selection rather than a fundamental operator?
Correct Answer: (C) Natural Join
Relational Algebra
The six fundamental operators are Select, Project, Union, Set Difference, Cartesian Product, and Rename. Join is derived from Cartesian product, selection, and projection.
Select the correct option.
In a one-to-many (1:N) relationship between entity A (1 side) and entity B (N side) in ER-to-Relational mapping, where should the foreign key be placed?
Correct Answer: (B) In the relation for B referencing A
ER-to-Relational Mapping
For a binary 1:N relationship, the primary key of the entity on the 1-side (A) is included as a foreign key in the relation on the N-side (B).