Loading…
Loading…
Loading…
150 questions · 150 marks · 150 minutes · Estimated cutoff: 100.25/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 of the following SQL statements removes all rows from a table by deallocating the data pages, does not fire delete triggers, and cannot be filtered with a WHERE clause?
Correct Answer: (C) TRUNCATE
Concept & Exam Tag
Topic: SQL DDL vs DML (TRUNCATE vs DELETE) | Asked in: UP LT Grade 2018, Bihar STET 2023
Explanation
TRUNCATE is a DDL command that quickly removes all records from a table by deallocating the data pages used to store table data. It cannot take a WHERE clause, logs minimal information into transaction logs, and does not fire DELETE triggers.
Exam Tip
TRUNCATE = DDL, deallocates pages, no WHERE clause, resets AUTO_INCREMENT. DELETE = DML, logs row-by-row, supports WHERE clause, fires triggers.
Select the correct option.
A relational schema R is in Boyce-Codd Normal Form (BCNF) if and only if for every non-trivial functional dependency X -> Y:
Correct Answer: (C) X is a super key
Concept & Exam Tag
Topic: Normalization (BCNF Conditions) | Asked in: Bihar STET 2023 Shift 2, DSSSB PGT CS 2021
Explanation
For a relation to be in BCNF (Boyce-Codd Normal Form), every determinant X in every non-trivial functional dependency X -> Y must be a super key. In 3NF, Y being a prime attribute is also allowed, but BCNF strictly eliminates that relaxation.
Exam Tip
3NF allows X -> Y if X is super key OR Y is prime attribute. BCNF strictly requires X to be a super key. Hence, every BCNF relation is in 3NF, but not vice versa.
Select the correct option.
In Boyce-Codd Normal Form (BCNF), for every non-trivial functional dependency X -> Y holding in a relation R, what must X be?
Correct Answer: (C) A superkey of R
BCNF Definition
BCNF requires that for every non-trivial functional dependency X -> Y, the determinant X must be a superkey of the relation.
Select the correct option.
In relational database design, which constraint ensures that a value appearing in one relation for a given set of attributes must also appear in another relation?
Correct Answer: (B) Referential Integrity Constraint
Concept & Exam Tag
Topic: Integrity Constraints | Asked in: Bihar STET Paper 2 CS 2023 Shift 1, UP LT Grade 2018
Explanation
Referential Integrity Constraint requires that if a foreign key in a referencing relation refers to a primary key of a referenced relation, that tuple must exist in the referenced relation, or the foreign key value must be NULL. Entity integrity states that no primary key attribute can be NULL.
Exam Tip
Entity Integrity = Primary key cannot be NULL. Referential Integrity = Foreign key must match an existing primary key or be NULL.
Select the correct option.
Which SQL clause is used to filter groups created by the GROUP BY clause based on an aggregate condition?
Correct Answer: (B) HAVING
SQL Clauses
WHERE filters individual rows before grouping, whereas HAVING filters grouped rows after GROUP BY and accepts aggregate functions like COUNT() or SUM().