Skip to content
ExamHope Logo

examhope

Primary Menu
  • Digital Logic
    • Arithmetic Operations
    • Asynchronous/Ripple Counters
    • Basic Gates
    • Boolean Algebraic Theorems
    • Codes
  • Data Structures
    • Binary Heaps
    • Binary Search
    • Binary Search Trees
    • Binary Tree
    • Binary Tree Sort
    • Bipartite Graphs
    • Complete Graph
  • Theory of Computation
    • Finite Automata
    • Finite Automaton First Example
  • Current Affairs
    • Sports News
    • Tech News
    • Bollywood News
    • Daily News
  • Database
  • Computer Network
  • Computer Organization and Architecture
  • C Language
  • Operating Systems
  • Software Engineering
  • Theory of Computation
  • About us
  • Contact Us
  • Privacy Policy
  • DMCA Policy
  • Terms and Conditions
  • Home
  • IT
  • Relational Calculus MCQs for Gate Exam
  • IT
  • Database
  • Relational Calculus

Relational Calculus MCQs for Gate Exam

examhopeinfo@gmail.com October 9, 2025 30 minutes read
Relational Calculus MCQs

Relational Calculus MCQs

Relational Calculus MCQs (Q1โ€“Q100)


Q1.

Consider relation Student(SID, Name, Age, Marks).
Which of the following Tuple Relational Calculus (TRC) expressions retrieves names of students with Marks > 80?
A. {t | โˆƒs โˆˆ Student (t.Name = s.Name โˆง s.Marks > 80)}
B. {t | โˆ€s โˆˆ Student (t.Marks > 80)}
C. {t | โˆƒs โˆˆ Student (s.Marks = 80)}
D. {t | t.Marks > 80}
โœ… Answer: A
๐Ÿ’ก Solution:
t represents result tuples; expression uses existential quantifier correctly and binds s to relation.


Q2.

In TRC, which quantifier ensures universal condition?
A. โˆƒ
B. โˆ€
C. ยฌโˆƒ
D. =
โœ… Answer: B
๐Ÿ’ก Solution:
โˆ€ (for all) ensures every tuple satisfies the condition โ€” used for universal quantification.


Q3.

Find names of students who are older than all students named ‘Riya’.
A. {t | โˆƒs โˆˆ Student (t.Age > s.Age โˆง s.Name=’Riya’)}
B. {t | โˆ€s โˆˆ Student (s.Name=’Riya’ โ‡’ t.Age > s.Age)}
C. {t | ยฌโˆƒs โˆˆ Student (s.Name=’Riya’ โˆง t.Age โ‰ค s.Age)}
D. Both B and C
โœ… Answer: D
๐Ÿ’ก Solution:
Both (B) universal and (C) negated existential forms are logically equivalent in relational calculus.


Q4.

If a TRC expression contains both โˆ€ and โˆƒ, it represents:
A. Procedural Query
B. Declarative Query
C. Imperative Program
D. SQL Stored Function
โœ… Answer: B
๐Ÿ’ก Solution:
Relational calculus is non-procedural (declarative) โ€” specifies what to retrieve, not how.


Q5.

Given Employee(EID, Dept, Salary) find employees whose salary is greater than some employee in Dept ‘HR’.
A. {t | โˆƒe โˆˆ Employee (e.Dept=’HR’ โˆง t.Salary > e.Salary)}
B. {t | โˆ€e โˆˆ Employee (e.Dept=’HR’ โˆง t.Salary > e.Salary)}
C. {t | t.Salary > ALL(SELECT Salary FROM Employee WHERE Dept=’HR’)}
D. {t | ยฌโˆƒe โˆˆ Employee (e.Dept=’HR’)}
โœ… Answer: A
๐Ÿ’ก Solution:
The existential quantifier โ€œsomeโ€ maps to โˆƒ, checking existence of a lower-salary HR employee.


Q6.

In Domain Relational Calculus (DRC), which is a valid query form?
A. { | P(x,y)}
B. {x,y | P(x,y)}
C. {t | t โˆˆ R}
D. {tuple | tuple โІ R}
โœ… Answer: A
๐Ÿ’ก Solution:
DRC expresses results as lists of attribute values, not tuple variables.


Q7.

Find all roll numbers r such that student scored more than 70 marks:
A. {r | โˆƒn,m (Student(r,n,m) โˆง m > 70)}
B. {r | โˆ€n,m (Student(r,n,m) โ‡’ m > 70)}
C. {r | Student(r,n,70)}
D. {r | โˆƒm (m < 70)}
โœ… Answer: A
๐Ÿ’ก Solution:
Uses domain variables (r,n,m) and existential quantifier correctly.


Q8.

Which of the following statements is true about relational calculus?
A. It specifies how to retrieve data.
B. It is equivalent in expressive power to relational algebra.
C. It can express non-relational operations.
D. It cannot represent negation.
โœ… Answer: B
๐Ÿ’ก Solution:
Coddโ€™s theorem: Relational algebra โ‰ก Relational calculus in expressive power.


Q9.

A safe TRC expression ensures:
A. Finite result set
B. Infinite result set
C. Referential independence
D. Nested quantification
โœ… Answer: A
๐Ÿ’ก Solution:
Safety rule restricts domain of variables โ‡’ only finite tuples are returned.


Q10.

Which is an unsafe TRC query?
A. {t | t โˆˆ Student โˆง t.Marks > 70}
B. {t | ยฌ(t โˆˆ Student)}
C. {t | โˆƒs โˆˆ Student (s.Marks = t.Marks)}
D. {t | t.Marks = 90}
โœ… Answer: B
๐Ÿ’ก Solution:
ยฌ(t โˆˆ Student) defines infinite domain โ€” unsafe.


Q11.

The domain of a variable in relational calculus refers to:
A. The type of variable
B. The set of all possible values
C. Tuple schema
D. Query result
โœ… Answer: B
๐Ÿ’ก Solution:
Domain = all possible attribute values a variable may take.


Q12.

Find all employee IDs who earn the highest salary:
A. {t | t โˆˆ Emp โˆง ยฌโˆƒe โˆˆ Emp (e.Salary > t.Salary)}
B. {t | โˆƒe โˆˆ Emp (e.Salary < t.Salary)}
C. {t | t โˆˆ Emp โˆง t.Salary < ALL(Emp.Salary)}
D. None
โœ… Answer: A
๐Ÿ’ก Solution:
Negated existence ensures no higher salary exists โ€” retrieves max-salary tuples.


Q13.

Which relational calculus construct allows expressing joins?
A. Multiple tuple variables and conjunction (โˆง)
B. Union operator
C. Arithmetic comparison
D. Cartesian quantifier
โœ… Answer: A
๐Ÿ’ก Solution:
Joining achieved using multiple tuple variables and conditions linking them.


Q14.

For R(A,B) and S(B,C), the TRC query {t | โˆƒrโˆˆR, sโˆˆS (r.B=s.B โˆง t.A=r.A โˆง t.C=s.C)} is equivalent to:
A. R โ‹ˆ S
B. R ร— S
C. R โˆ’ S
D. ฯ€(A,C)(R)
โœ… Answer: A
๐Ÿ’ก Solution:
Join condition r.B=s.B merges R and S tuples.


Q15.

In TRC, {t | โˆƒr โˆˆ R (t.A=r.A โˆง r.B>50)} returns:
A. Tuples with A values from R where B>50
B. All tuples of R
C. None
D. Only B values
โœ… Answer: A
๐Ÿ’ก Solution:
The result includes all tuples t with A taken from r satisfying predicate.


Q16.

Which of the following is not allowed in safe relational calculus?
A. Equality
B. Conjunction
C. Unrestricted variables
D. Projection
โœ… Answer: C
๐Ÿ’ก Solution:
All free variables must be range-restricted for safety.


Q17.

DRC and TRC differ primarily in:
A. Result form โ€” domain values vs tuple variables
B. Expressive power
C. Quantifier types
D. Usage of joins
โœ… Answer: A
๐Ÿ’ก Solution:
TRC uses tuples, DRC uses individual domain variables.


Q18.

Which relational calculus query returns employees who donโ€™t belong to Dept 20?
A. {t | t โˆˆ Emp โˆง ยฌ(t.Dept=20)}
B. {t | โˆƒe โˆˆ Emp (t.Deptโ‰ 20)}
C. {t | โˆ€e โˆˆ Emp (e.Dept=20)}
D. None
โœ… Answer: A
๐Ÿ’ก Solution:
Negation inside predicate correctly filters Dept โ‰  20.


Q19.

A bounded variable in TRC means:
A. It has finite possible values
B. It is bound by a quantifier
C. It is constant
D. It has no quantifier
โœ… Answer: B
๐Ÿ’ก Solution:
Bound variable appears within scope of โˆƒ or โˆ€.


Q20.

An unbound variable represents:
A. Variable not used in condition
B. Output (free) variable of the query
C. Infinite domain variable
D. Aggregate function
โœ… Answer: B
๐Ÿ’ก Solution:
Free variable (unbound) defines the attributes to appear in result.


Q21.

Which query retrieves tuples of R where no matching tuple in S exists (anti-join)?
A. {t | tโˆˆR โˆง ยฌโˆƒsโˆˆS (t.A=s.A)}
B. {t | โˆƒsโˆˆS (t.Aโ‰ s.A)}
C. {t | tโˆˆS}
D. {t | โˆƒtโˆˆR}
โœ… Answer: A
๐Ÿ’ก Solution:
Negated existential join โ‡’ anti-join (R โˆ’ Rโ‹ˆS).


Q22.

For safe queries, the domain of result variables must be:
A. Finite
B. Infinite
C. Universal
D. None
โœ… Answer: A
๐Ÿ’ก Solution:
Safety ensures finite computable result sets.


Q23.

In DRC, to express intersection, one uses:
A. โˆง (AND) operator
B. โˆจ (OR) operator
C. โ‡’
D. ยฌ
โœ… Answer: A
๐Ÿ’ก Solution:
Intersection = tuples satisfying both predicates simultaneously.


Q24.

Which TRC expression finds names of students not enrolled in any course?
A. {t | tโˆˆStudent โˆง ยฌโˆƒeโˆˆEnroll (e.SID=t.SID)}
B. {t | tโˆˆStudent โˆง โˆƒeโˆˆEnroll (e.SID=t.SID)}
C. {t | โˆ€eโˆˆEnroll (e.SIDโ‰ t.SID)}
D. Both A and C
โœ… Answer: D
๐Ÿ’ก Solution:
Negated existence and universal quantification both represent โ€œno enrollmentโ€.


Q25.

Which of the following cannot be expressed in pure relational calculus?
A. Aggregation (SUM, AVG)
B. Selection
C. Projection
D. Join
โœ… Answer: A
๐Ÿ’ก Solution:
Relational calculus lacks built-in aggregation operators โ€” handled in extended forms only.

Q26.

Given relation Course(CID, CName, Credits), find course IDs having more than 3 credits.
A. {t | t โˆˆ Course โˆง t.Credits > 3}
B. {t | โˆ€c โˆˆ Course (t.Credits > 3)}
C. {t | โˆƒc โˆˆ Course (c.Credits < 3)}
D. {t | ยฌ(t.Credits โ‰ค 3)}
โœ… Answer: A
๐Ÿ’ก Solution:
Direct tuple predicate with > operator filters courses; option B compares unrelated tuples.


Q27.

Which of the following TRC queries retrieves students enrolled in both โ€œDBMSโ€ and โ€œOSโ€ courses?
A. {t | โˆƒe1,e2 โˆˆ Enroll (e1.SID = e2.SID โˆง e1.Course=’DBMS’ โˆง e2.Course=’OS’ โˆง t.SID = e1.SID)}
B. {t | โˆƒe โˆˆ Enroll (e.Course IN {‘DBMS’,’OS’})}
C. {t | โˆ€e โˆˆ Enroll (e.Course=’DBMS’)}
D. {t | t.Course=’DBMS’ โˆจ t.Course=’OS’}
โœ… Answer: A
๐Ÿ’ก Solution:
Requires existence of two enrollments for the same SID; conjunction achieves intersection.


Q28.

Which TRC expression finds employees who earn less than everyone in Department 40?
A. {t | โˆ€e โˆˆ Emp (e.Dept=40 โ‡’ t.Salary < e.Salary)}
B. {t | โˆƒe โˆˆ Emp (e.Dept=40 โˆง t.Salary < e.Salary)}
C. {t | t.Dept โ‰  40}
D. {t | ยฌโˆƒe โˆˆ Emp (e.Dept=40 โˆง t.Salary โ‰ฅ e.Salary)}
โœ… Answer: D
๐Ÿ’ก Solution:
Negated existential and universal formulations are equivalent; D avoids unsafe universal scanning.


Q29.

In TRC, free variables correspond to:
A. Output attributes
B. Temporary variables
C. Quantified conditions only
D. Aggregates
โœ… Answer: A
๐Ÿ’ก Solution:
Unbound (free) variables define the result schema.


Q30.

Which of the following TRC queries is unsafe?
A. {t | tโˆˆEmp โˆง t.Salary > 50000}
B. {t | ยฌโˆƒe โˆˆ Emp (e.Salary = t.Salary)}
C. {t | t.Salary โ‰ฅ 0}
D. {t | tโˆˆEmp โˆง t.Dept=’IT’}
โœ… Answer: C
๐Ÿ’ก Solution:
t.Salary โ‰ฅ 0 has no range restrictionโ€”could generate infinite values.


Q31.

For safe queries, each free variable must appear:
A. Inside at least one atomic formula relating it to a relation
B. As a constant
C. Only once
D. After quantifier
โœ… Answer: A
๐Ÿ’ก Solution:
Safety rule: every variable should be range-restricted by relation membership.


Q32.

Which TRC query is equivalent to ฯ€ A (R)?
A. {t | โˆƒr โˆˆ R (t.A = r.A)}
B. {t | โˆ€r โˆˆ R (t.A = r.A)}
C. {t | ยฌโˆƒr โˆˆ R (t.A โ‰  r.A)}
D. {t | t โˆˆ R โˆง r.A = 10}
โœ… Answer: A
๐Ÿ’ก Solution:
Existential quantification captures projection by matching each A value in R.


Q33.

Given R(A,B) and S(B,C), the TRC query {t | โˆƒrโˆˆR, sโˆˆS (r.B=s.B โˆง t.A=r.A โˆง t.C=s.C)} corresponds to which algebraic operation?
A. Join
B. Cartesian product
C. Difference
D. Projection
โœ… Answer: A
๐Ÿ’ก Solution:
The equality r.B = s.B implies a natural join on B.


Q34.

Which calculus query retrieves all tuples of R not in S (assuming both have attributes A,B)?
A. {t | tโˆˆR โˆง ยฌโˆƒsโˆˆS (t.A=s.A โˆง t.B=s.B)}
B. {t | โˆƒsโˆˆS (t.Aโ‰ s.A)}
C. {t | tโˆˆS}
D. {t | ยฌ(tโˆˆR)}
โœ… Answer: A
๐Ÿ’ก Solution:
Negated existential ensures tuples present in R only โ€” represents R โˆ’ S.


Q35.

Which calculus operation implements union?
A. Logical OR (โˆจ)
B. Logical AND (โˆง)
C. Negation (ยฌ)
D. Implication (โ‡’)
โœ… Answer: A
๐Ÿ’ก Solution:
Union = tuples satisfying predicate P or Q.


Q36.

Find employees whose salary is not equal to any managerโ€™s salary.
A. {t | tโˆˆEmp โˆง ยฌโˆƒmโˆˆMgr (t.Salary = m.Salary)}
B. {t | tโˆˆEmp โˆง โˆ€mโˆˆMgr (t.Salary = m.Salary)}
C. {t | tโˆˆEmp โˆง mโˆˆMgr}
D. {t | tโˆˆMgr}
โœ… Answer: A
๐Ÿ’ก Solution:
Negated existence excludes all salaries matching a managerโ€™s.


Q37.

A tuple variable in TRC must always range over:
A. A relation in the database
B. Domain of constants
C. Entire universe U
D. NULL values
โœ… Answer: A
๐Ÿ’ก Solution:
Tuple variable takes values from an existing relationโ€™s tuples.


Q38.

Which relational calculus query finds departments having no employees?
A. {t | tโˆˆDept โˆง ยฌโˆƒeโˆˆEmp (t.DID = e.DID)}
B. {t | โˆƒeโˆˆEmp (t.DID = e.DID)}
C. {t | โˆ€eโˆˆEmp (t.DID โ‰  e.DID)}
D. Both A and C
โœ… Answer: D
๐Ÿ’ก Solution:
Negated existence (A) and universal non-equality (C) are equivalent forms.


Q39.

If a TRC query returns an infinite result, it is said to be:
A. Unsafe
B. Non-relational
C. Recursive
D. Non-deterministic
โœ… Answer: A
๐Ÿ’ก Solution:
Unsafe queries lack finite domain restrictions.


Q40.

Which of these DRC queries expresses selection?
A. { | R(x,y) โˆง y > 10}
B. { | R(x,y)}
C. { | S(x)}
D. { | y > 10}
โœ… Answer: A
๐Ÿ’ก Solution:
Predicate y>10 filters tuples โ†’ selection.


Q41.

What does the query {<x> | R(x) โˆจ S(x)} return?
A. Union of R and S
B. Intersection of R and S
C. Difference R โˆ’ S
D. Cartesian product
โœ… Answer: A
๐Ÿ’ก Solution:
Logical OR represents union.


Q42.

Which of the following correctly represents R โˆฉ S in DRC?
A. { | R(x) โˆง S(x)}
B. { | R(x) โˆจ S(x)}
C. { | R(x) โˆง ยฌS(x)}
D. { | ยฌR(x) โˆจ S(x)}
โœ… Answer: A
๐Ÿ’ก Solution:
Intersection โ†” conjunction (AND).


Q43.

For a database with R(A,B), the query {t | ยฌ(tโˆˆR)} is:
A. Unsafe
B. Join query
C. Selection
D. Aggregation
โœ… Answer: A
๐Ÿ’ก Solution:
Negating relation membership introduces infinite tuples โ†’ unsafe.


Q44.

Which of the following correctly expresses division R(A,B) รท S(B)?
A. {t | โˆ€s โˆˆ S โˆƒr โˆˆ R (t.A = r.A โˆง r.B = s.B)}
B. {t | โˆƒs โˆˆ S โˆ€r โˆˆ R (t.A = r.A)}
C. {t | ยฌโˆƒs โˆˆ S (r.B = s.B)}
D. {t | t โˆˆ R}
โœ… Answer: A
๐Ÿ’ก Solution:
Division = โ€œfor all B in S, A has that Bโ€ โ†’ universal within existential structure.


Q45.

Which TRC expression returns all tuples of R where B = 10 or C = 20?
A. {t | tโˆˆR โˆง (t.B = 10 โˆจ t.C = 20)}
B. {t | tโˆˆR โˆง (t.B = 10 โˆง t.C = 20)}
C. {t | tโˆˆR โˆจ t.B = 10}
D. {t | tโˆˆR โˆง t.B > 20}
โœ… Answer: A
๐Ÿ’ก Solution:
Logical OR inside predicate selects either condition.


Q46.

Which calculus query ensures no duplicate tuples in output?
A. All TRC/DRC queries (by definition)
B. Explicit DISTINCT keyword
C. Aggregation function
D. Use of UNION ALL
โœ… Answer: A
๐Ÿ’ก Solution:
Relational model treats relations as sets โ†’ duplicates not allowed.


Q47.

Which TRC query finds students whose marks are greater than 60 and less than 90?
A. {t | tโˆˆStudent โˆง t.Marks > 60 โˆง t.Marks < 90} B. {t | tโˆˆStudent โˆจ t.Marks > 60}
C. {t | t.Marks > 90}
D. {t | ยฌt.Marks < 60}
โœ… Answer: A
๐Ÿ’ก Solution:
Conjunction restricts range between 60 and 90.


Q48.

Which operator corresponds to difference in relational algebra?
A. ยฌ (existential negation)
B. โˆจ
C. โ‡’
D. โˆƒ
โœ… Answer: A
๐Ÿ’ก Solution:
Difference uses negation to remove matching tuples.


Q49.

Which TRC expression retrieves tuples from R with attribute A equal to constant 5?
A. {t | tโˆˆR โˆง t.A = 5}
B. {t | t.A > 5}
C. {t | ยฌ(tโˆˆR)}
D. {t | โˆƒr โˆˆ R (r.A = 5)}
โœ… Answer: A
๐Ÿ’ก Solution:
Simple predicate with constant comparison.


Q50.

Which TRC query expresses existence of at least one record in relation R with B = 30?
A. {t | โˆƒr โˆˆ R (r.B = 30 โˆง t = r)}
B. {t | โˆ€r โˆˆ R (r.B = 30)}
C. {t | ยฌโˆƒr โˆˆ R (r.B โ‰  30)}
D. {t | tโˆˆR โˆง t.B = 30}
โœ… Answer: D
๐Ÿ’ก Solution:
Direct existential membership satisfying predicate B = 30.

Q51.

Relation: Book(BID, Title, Year, Pages).
Which TRC expression returns BIDs of books published after 2010 with more than 300 pages?
A. {t | โˆƒb โˆˆ Book (t.BID = b.BID โˆง b.Year > 2010 โˆง b.Pages > 300)}
B. {t | t.Year > 2010 โˆง t.Pages > 300}
C. {t | โˆ€b โˆˆ Book (b.Year > 2010 โˆง b.Pages > 300)}
D. {t | ยฌโˆƒb โˆˆ Book (b.Year โ‰ค 2010 โˆจ b.Pages โ‰ค 300)}
โœ… Answer: A
๐Ÿ’ก Solution: A binds b to tuples of Book and projects BID when both predicates hold. B lacks relation binding for t and is unsafe.


Q52.

Let Sale(SID, Prod, Qty) and Prod(PID, Category).
TRC: {t | โˆƒs โˆˆ Sale, p โˆˆ Prod (s.Prod = p.PID โˆง p.Category = 'Gadgets' โˆง t.SID = s.SID)} โ€” what does it produce?
A. Sale IDs for sales of products in category ‘Gadgets’
B. Product IDs in Gadgets
C. All sales tuples not in Gadgets
D. Empty set
โœ… Answer: A
๐Ÿ’ก Solution: Existential quantifiers join Sale and Prod on product id and project sale id.


Q53.

Which DRC formula corresponds to selection ฯƒ(Price < 100)(Item)?
A. {<i,p> | Item(i,p) โˆง p < 100}
B. {<i,p> | Item(i,p) โˆจ p < 100}
C. {<i> | โˆƒp Item(i,p)}
D. {<p> | p < 100}
โœ… Answer: A
๐Ÿ’ก Solution: DRC expresses attribute values; include predicate p<100 with relation atom.


Q54.

Consider TRC: {t | t โˆˆ Emp โˆง ยฌโˆƒm โˆˆ Emp (m.Mgr = t.EID)}. What does it return?
A. Employees who are not managers of anyone (no direct reports)
B. Managers only
C. All employees (unsafe)
D. Employees with no manager assigned
โœ… Answer: A
๐Ÿ’ก Solution: ยฌโˆƒm (m.Mgr = t.EID) means no tuple m has t as manager โ‡’ t has no direct reports.


Q55.

Which TRC expression correctly captures: โ€œFind students who took every course offered in 2022โ€? (Relations Student(SID, Name), Offer(CID, Year), Enroll(SID, CID))
A. {t | t โˆˆ Student โˆง โˆ€c โˆˆ Offer (c.Year=2022 โ‡’ โˆƒe โˆˆ Enroll (e.SID = t.SID โˆง e.CID = c.CID))}
B. {t | t โˆˆ Student โˆง โˆƒc โˆˆ Offer (c.Year=2022 โ‡’ โˆƒe โˆˆ Enroll ... )}
C. {t | โˆƒe โˆˆ Enroll (e.SID = t.SID)}
D. {t | โˆ€e โˆˆ Enroll (e.SID = t.SID)}
โœ… Answer: A
๐Ÿ’ก Solution: For all courses in 2022, there must exist a corresponding enrollment for that student โ€” universalโ†’existential structure implements division.


Q56.

Is the TRC query {t | โˆƒx (R(x) โˆง t.A = x)} safe if x ranges over R?
A. Yes โ€” x is range-restricted by relation R.
B. No โ€” free variable t is not bound.
C. No โ€” existential makes it unsafe.
D. Yes only if R finite.
โœ… Answer: A
๐Ÿ’ก Solution: x is bounded to finite relation R, and t is defined in terms of x so it’s safe.


Q57.

Which TRC expression is equivalent to relational algebra ฯ€(Name)(Student โ‹ˆ Enroll โ‹ˆ Course WHERE Course.Sem='S1')? (Course(CID, Sem))
A. {t | โˆƒs โˆˆ Student, e โˆˆ Enroll, c โˆˆ Course (s.SID = e.SID โˆง e.CID = c.CID โˆง c.Sem='S1' โˆง t.Name = s.Name)}
B. {t | โˆƒs โˆˆ Student (t.Name = s.Name)}
C. {t | t.Sem = 'S1'}
D. {t | โˆ€c โˆˆ Course (c.Sem = 'S1')}
โœ… Answer: A
๐Ÿ’ก Solution: Joins via equalities and project Name via t.Name binding.


Q58.

Which TRC form is unsafe?
A. {t | โˆƒx (ยฌR(x) โˆง t = x)} where R is a relation
B. {t | โˆƒx (R(x) โˆง t.A = x.A)}
C. {t | t โˆˆ R โˆง t.B > 5}
D. {t | โˆƒr โˆˆ R (t.A = r.A โˆง r.B>0)}
โœ… Answer: A
๐Ÿ’ก Solution: ยฌR(x) is not range restricting; x can be any value from infinite domain โ†’ unsafe.


Q59.

Translate to TRC: โ€œFind product ids ordered by at least two distinct customers.โ€ (Order(PID, CustID))
A. {t | โˆƒo1,o2 โˆˆ Order (o1.PID=o2.PID โˆง o1.CustIDโ‰ o2.CustID โˆง t.PID=o1.PID)}
B. {t | โˆƒo โˆˆ Order (t.PID=o.PID)}
C. {t | โˆ€o โˆˆ Order (o.PID=t.PID)}
D. {t | ยฌโˆƒo โˆˆ Order (o.PID โ‰  t.PID)}
โœ… Answer: A
๐Ÿ’ก Solution: Two distinct order tuples with same PID but different CustID ensures at least two customers ordered it.


Q60.

Given TRC: {t | tโˆˆR โˆง โˆ€s โˆˆ S (s.X = t.X โ‡’ s.Y = t.Y)} โ€” what does it express?
A. For each t in R, all S tuples matching on X must have same Y as t (consistency condition)
B. R subset of S
C. S subset of R
D. Always true
โœ… Answer: A
๐Ÿ’ก Solution: Universal quantification enforces that any S tuple with same X shares Y with t.


Q61.

Which DRC query gives the set of x such that x appears in relation R but not in S (R(A) and S(A)) ?
A. {<x> | R(x) โˆง ยฌS(x)}
B. {<x> | R(x) โˆจ S(x)}
C. {<x> | ยฌR(x)}
D. {<x> | โˆƒy R(y)}
โœ… Answer: A
๐Ÿ’ก Solution: Conjunction with negation expresses set difference R โˆ’ S.


Q62.

Which TRC expression is equivalent to algebra R โ‹ˆ S when R(A,B) and S(B,C)?
A. {t | โˆƒr โˆˆ R, s โˆˆ S (r.B = s.B โˆง t.A = r.A โˆง t.B = r.B โˆง t.C = s.C)}
B. {t | t โˆˆ R}
C. {t | โˆ€r โˆˆ R (r.B = t.B)}
D. {t | r.B = s.B}
โœ… Answer: A
๐Ÿ’ก Solution: Existential bind both relations and equate join attribute; project combined attributes.


Q63.

Which calculus pattern yields the intersection of R(A) and S(A)?
A. {<x> | R(x) โˆง S(x)}
B. {<x> | R(x) โˆจ S(x)}
C. {<x> | R(x) โˆง ยฌS(x)}
D. {<x> | ยฌR(x)}
โœ… Answer: A
๐Ÿ’ก Solution: AND requires x to be in both relations.


Q64.

Which of these TRC forms correctly represents: โ€œCustomers who did not buy product P9 in year 2023โ€? (Order(cust,pid,odate))
A. {t | t โˆˆ Customer โˆง ยฌโˆƒo โˆˆ Order (o.Cust = t.Cust โˆง o.PID='P9' โˆง EXTRACT(YEAR FROM o.odate)=2023)}
B. {t | โˆƒo โˆˆ Order (o.PID='P9')}
C. {t | t.Cust='P9'}
D. {t | โˆ€o โˆˆ Order (o.PID='P9')}
โœ… Answer: A
๐Ÿ’ก Solution: Negated existential prevents any 2023 order of P9 for the customer.


Q65.

Which DRC expression is unsafe?
A. {<x> | โˆƒy (R(x,y) โˆง y>0)}
B. {<x> | x>0}
C. {<x> | R(x,y) โˆง S(y)} if y is properly quantified
D. {<x> | โˆƒy (R(x,y))}
โœ… Answer: B
๐Ÿ’ก Solution: x>0 with no relation atom bounding x is unbounded โ†’ infinite domain โ†’ unsafe.


Q66.

Express in TRC: โ€œFind employees who report (directly) to a manager in Dept 30.โ€ (Emp(EID,MID,Dept))
A. {t | tโˆˆEmp โˆง โˆƒm โˆˆ Emp (m.EID = t.MID โˆง m.Dept = 30)}
B. {t | t.Dept = 30}
C. {t | โˆ€m โˆˆ Emp (m.Dept = 30)}
D. {t | t.MID = 30}
โœ… Answer: A
๐Ÿ’ก Solution: Existentially find manager tuple m whose Dept=30, equate manager id.


Q67.

Which TRC query returns A values from R(A,B) that pair with all B values present in S(B)?
A. {t | โˆƒr โˆˆ R (t.A = r.A โˆง โˆ€s โˆˆ S โˆƒr2 โˆˆ R (r2.A = r.A โˆง r2.B = s.B))}
B. {t | โˆƒr โˆˆ R (t.A = r.A)}
C. {t | โˆ€r โˆˆ R (r.B = t.A)}
D. {t | ยฌโˆƒs โˆˆ S (s.B = t.A)}
โœ… Answer: A
๐Ÿ’ก Solution: Nested universal-existential captures division: for every s in S there exists R tuple linking that A to s.B.


Q68.

Which TRC expression is logically equivalent to {t | tโˆˆR โˆง ยฌโˆƒsโˆˆS (s.K = t.K)} ?
A. {t | tโˆˆR โˆง โˆ€sโˆˆS (s.K โ‰  t.K)}
B. {t | tโˆˆR โˆจ โˆ€sโˆˆS (s.K โ‰  t.K)}
C. {t | โˆƒs โˆˆ S (s.K = t.K)}
D. {t | ยฌtโˆˆR}
โœ… Answer: A
๐Ÿ’ก Solution: Negated existential equals universal non-equality (De Morgan on quantifiers).


Q69.

Given R(A,B) and S(A,B), which TRC query describes R โˆ† S (symmetric difference)?
A. {t | (t โˆˆ R โˆง ยฌโˆƒsโˆˆS (s.A=t.A โˆง s.B=t.B)) โˆจ (t โˆˆ S โˆง ยฌโˆƒrโˆˆR (r.A = t.A โˆง r.B = t.B))}
B. {t | t โˆˆ R}
C. {t | t โˆˆ S}
D. {t | โˆƒu (u.A = t.A)}
โœ… Answer: A
๐Ÿ’ก Solution: Symmetric difference = tuples in R but not S OR in S but not R.


Q70.

Which TRC expression is safe and returns the Name of students who share a mark with at least one other student? (Student(SID,Name,Marks))
A. {t | โˆƒs1,s2 โˆˆ Student (s1.SID โ‰  s2.SID โˆง s1.Marks = s2.Marks โˆง t.Name = s1.Name)}
B. {t | โˆƒs โˆˆ Student (t.Name = s.Name)}
C. {t | โˆ€s1,s2 (s1.Marks = s2.Marks)}
D. {t | ยฌโˆƒs (s.Marks = t.Marks)}
โœ… Answer: A
๐Ÿ’ก Solution: Two different students with same Marks; project the name for one of them. Variables are range-restricted.


Q71.

Is the TRC {t | โˆƒs โˆˆ R (t.A = s.A) โˆง โˆƒu (u > 5)} safe?
A. No โ€” u is unbounded by any relation
B. Yes โ€” both quantifiers existential make it safe
C. Yes โ€” because u>5 restricts it
D. No โ€” s is unbounded
โœ… Answer: A
๐Ÿ’ก Solution: The variable u has no relation atom bounding it, so domain is unbounded โ†’ unsafe.


Q72.

Which TRC expression computes projection ฯ€(B)(R) for R(A,B,C)?
A. {t | โˆƒr โˆˆ R (t.B = r.B)}
B. {t | โˆ€r โˆˆ R (t.B = r.B)}
C. {t | t โˆˆ R}
D. {t | โˆƒr โˆˆ R (t.A = r.A)}
โœ… Answer: A
๐Ÿ’ก Solution: Existentially bind a tuple and project its B component.


Q73.

Given TRC {t | โˆƒr โˆˆ R (t.A = r.A โˆง r.B < 0) โˆง ยฌโˆƒs โˆˆ S (s.C = r.A)}, which English description is correct?
A. Tuples t whose A appears in R with negative B and that A does not appear as C in S
B. All tuples of R with negative B
C. Tuples t in S with C negative
D. None
โœ… Answer: A
๐Ÿ’ก Solution: Conjunction of existence in R with negative B and non-existence in S describes the stated set.


Q74.

Which of the following DRC queries is unsafe? Assume R(x) and S(y) exist.
A. {<x> | R(x) โˆจ S(x)}
B. {<x> | x > 1000}
C. {<x> | โˆƒy (R(y) โˆง x = y)}
D. {<x> | R(x) โˆง ยฌS(x)}
โœ… Answer: B
๐Ÿ’ก Solution: x>1000 without relation bound allows infinitely many domain values โ†’ unsafe.


Q75.

Which TRC pattern correctly expresses: โ€œThere exists an author who wrote books in both 2018 and 2022โ€? (Book(BID, Author, Year))
A. {t | โˆƒb1, b2 โˆˆ Book (b1.Author = b2.Author โˆง b1.Year = 2018 โˆง b2.Year = 2022 โˆง t.Author = b1.Author)}
B. {t | โˆ€b (b.Year = 2018 โˆง b.Year = 2022)}
C. {t | โˆƒb (b.Year = 2018 โˆจ b.Year = 2022)}
D. {t | ยฌโˆƒb (b.Year = 2018 โˆง b.Year = 2022)}
โœ… Answer: A
๐Ÿ’ก Solution: Needs two Book tuples with same Author but different Year values; existential pair enforces that.

Q76.

Relation Movie(MID, Title, Year, Rating).
Which TRC expression returns MIDs of movies rated โ‰ฅ 8.5 released after 2015?
A. {t | โˆƒm โˆˆ Movie (t.MID = m.MID โˆง m.Rating >= 8.5 โˆง m.Year > 2015)}
B. {t | โˆ€m โˆˆ Movie (m.Rating >= 8.5 โˆง m.Year > 2015)}
C. {t | ยฌโˆƒm โˆˆ Movie (m.Rating < 8.5)}
D. {t | t.Rating >= 8.5}
โœ… Answer: A
๐Ÿ’ก Solution: Existentially bind m to Movie and project MID when both predicates hold; other forms are unsafe or incorrect.


Q77.

Given A(X,Y) and B(Y,Z), which TRC describes ฯ€_X(A โ‹ˆ B)?
A. {t | โˆƒa โˆˆ A, b โˆˆ B (a.Y = b.Y โˆง t.X = a.X)}
B. {t | โˆ€a โˆˆ A (t.X = a.X)}
C. {t | โˆƒb โˆˆ B (t.X = b.Z)}
D. {t | t โˆˆ A}
โœ… Answer: A
๐Ÿ’ก Solution: Existential join binds A and B by Y, and projects A.X.


Q78.

Which TRC expression is equivalent to relational algebra R โˆ’ S when both have (A,B)?
A. {t | t โˆˆ R โˆง ยฌโˆƒs โˆˆ S (s.A = t.A โˆง s.B = t.B)}
B. {t | t โˆˆ S โˆง ยฌโˆƒr โˆˆ R (r.A = t.A)}
C. {t | โˆƒs โˆˆ S (s.A != t.A)}
D. {t | t โˆˆ R โˆจ t โˆˆ S}
โœ… Answer: A
๐Ÿ’ก Solution: Negated existential excludes any tuple that also occurs in S.


Q79.

TRC: {t | โˆƒrโˆˆR (t.A = r.A) โˆง โˆ€sโˆˆS (s.B โ‰  t.A)} โ€” is it safe?
A. Yes, if domains of R and S are finite (they are relations) and t is range-restricted via r
B. No โ€” universal quantifier makes it unsafe always
C. No โ€” t not bound to S
D. Yes only if S empty
โœ… Answer: A
๐Ÿ’ก Solution: t is tied to rโˆˆR so range-restricted; universal on S is okay because S finite; expression is safe.


Q80.

Which DRC query yields elements present in exactly one of R(A) or S(A) (symmetric difference)?
A. {<x> | (R(x) โˆง ยฌS(x)) โˆจ (S(x) โˆง ยฌR(x))}
B. {<x> | R(x) โˆง S(x)}
C. {<x> | R(x) โˆจ S(x)}
D. {<x> | ยฌR(x)}
โœ… Answer: A
๐Ÿ’ก Solution: XOR logic via (R and not S) OR (S and not R) implements symmetric difference.


Q81.

Which TRC expression returns Dept values that have at least one employee with salary > 1,00,000? (Emp(EID, Dept, Sal))
A. {t | โˆƒe โˆˆ Emp (e.Dept = t.Dept โˆง e.Sal > 100000)}
B. {t | โˆ€e โˆˆ Emp (e.Sal > 100000)}
C. {t | t.Dept = 'HR'}
D. {t | ยฌโˆƒe โˆˆ Emp (e.Sal > 100000)}
โœ… Answer: A
๐Ÿ’ก Solution: Existential quantifier finds existence of at least one high-salary employee per department and projects Dept.


Q82.

Translate to TRC: โ€œFind student IDs who took no course offered in Semester = ‘S2’.โ€ (Offer(CID, Sem), Enroll(SID,CID))
A. {t | t โˆˆ Student โˆง ยฌโˆƒc โˆˆ Offer (c.Sem='S2' โˆง โˆƒe โˆˆ Enroll (e.SID = t.SID โˆง e.CID = c.CID))}
B. {t | โˆƒc โˆˆ Offer (c.Sem='S2' โˆง ยฌโˆƒe โˆˆ Enroll (e.SID = t.SID โˆง e.CID = c.CID))}
C. {t | โˆƒe โˆˆ Enroll (e.SID = t.SID)}
D. {t | t.Sem = 'S2'}
โœ… Answer: A
๐Ÿ’ก Solution: For each Student t, ensure no Offer in S2 exists such that the student enrolled in it (negated existential over nested existential achieves anti-membership).


Q83.

Which TRC form correctly expresses: โ€œThere exists an author who has written at least three distinct booksโ€? (Book(BID, Author))
A. {t | โˆƒb1,b2,b3 โˆˆ Book (b1.Author = b2.Author โˆง b2.Author = b3.Author โˆง b1.BID โ‰  b2.BID โˆง b1.BID โ‰  b3.BID โˆง b2.BID โ‰  b3.BID โˆง t.Author = b1.Author)}
B. {t | โˆƒb โˆˆ Book (t.Author = b.Author)}
C. {t | โˆ€b โˆˆ Book (b.Author = t.Author)}
D. {t | ยฌโˆƒb โˆˆ Book (b.Author = t.Author)}
โœ… Answer: A
๐Ÿ’ก Solution: Three existentially bound book tuples with same Author but pairwise distinct BIDs implement “at least three distinct books.”


Q84.

Given TRC {t | t โˆˆ R โˆง โˆƒs โˆˆ S (s.X = t.X)} โ€” which algebraic operation does it map to?
A. Projection of R after semi-join with S on X (i.e., semijoin R โ‹‰ S projected as R rows with match)
B. Cartesian product R ร— S
C. Difference R โˆ’ S
D. Union R โˆช S
โœ… Answer: A
๐Ÿ’ก Solution: Existence of matching s in S selects R tuples having counterpart in S โ€” semijoin behavior.


Q85.

Which TRC query is equivalent to DRC {<a> | โˆƒb (R(a,b) โˆง S(b))}?
A. {t | โˆƒr โˆˆ R, s โˆˆ S (r.A = t.a โˆง r.B = s.B)} (with appropriate attribute naming)
B. {t | โˆ€r โˆˆ R (r.A = t.a โˆง r.B = s.B)}
C. {t | โˆƒr โˆˆ R (r.A = t.a)}
D. {t | t.A > 0}
โœ… Answer: A
๐Ÿ’ก Solution: Convert domain quantification into tuple quantifiers binding R and S, matching attributes accordingly.


Q86.

Is {t | โˆƒr โˆˆ R (t.A = r.A) โˆง โˆƒs โˆˆ S (t.A = s.B)} equivalent to {t | โˆƒr โˆˆ R, s โˆˆ S (t.A = r.A โˆง r.A = s.B)}?
A. Yes โ€” conjunction of two existentials can be combined into single existential over both relations.
B. No โ€” they differ in semantics
C. Only if R and S disjoint
D. None
โœ… Answer: A
๐Ÿ’ก Solution: Independent exists can be merged into a single existential binding both variables (scoping unchanged), giving same meaning.


Q87.

Which TRC expression returns authors who did not write any book in 2020? (Book(BID,Author,Year))
A. {t | t โˆˆ Author โˆง ยฌโˆƒb โˆˆ Book (b.Author = t.Author โˆง b.Year = 2020)}
B. {t | โˆƒb โˆˆ Book (b.Year โ‰  2020)}
C. {t | โˆ€b โˆˆ Book (b.Year = 2020)}
D. {t | t.Year โ‰  2020}
โœ… Answer: A
๐Ÿ’ก Solution: Negated existential over Book with Year = 2020 ensures authors without 2020 books.


Q88.

Given R(A,B) and S(A), which TRC query finds A values in R that are not in S?
A. {t | โˆƒr โˆˆ R (t.A = r.A โˆง ยฌS(r.A))} (tweak: use ยฌโˆƒsโˆˆS(s.A = r.A))
B. {t | โˆƒr โˆˆ R (t.A = r.A โˆง ยฌโˆƒs โˆˆ S (s.A = r.A))}
C. {t | โˆƒs โˆˆ S (t.A = s.A)}
D. {t | t โˆˆ S}
โœ… Answer: B
๐Ÿ’ก Solution: Need to check non-existence in S for same A; B is correct safe pattern (A form is shorthand but must formalize ยฌโˆƒs).


Q89.

Which TRC expression corresponds to the algebra ฯ€(A)(R โ‹ˆ S) when R(A,B) and S(B)?
A. {t | โˆƒr โˆˆ R, s โˆˆ S (r.B = s.B โˆง t.A = r.A)}
B. {t | t.A โˆˆ R.A}
C. {t | โˆ€s โˆˆ S (r.B = s.B)}
D. {t | t โˆˆ S}
โœ… Answer: A
๐Ÿ’ก Solution: Existentially join and project A.


Q90.

Which of the following TRC forms is safe?
A. {t | โˆƒx (x > 0 โˆง t.A = x)} with x unbounded
B. {t | โˆƒr โˆˆ R (t.A = r.A)}
C. {t | ยฌโˆƒx (x > 5)}
D. {t | โˆ€x t.A = x}
โœ… Answer: B
๐Ÿ’ก Solution: B range-restricts variable via R; others include unbounded variables or impossible universal constraints.


Q91.

Which TRC query represents โ€œFind students who have taken no course more than onceโ€? (Enroll(SID,CID))
A. {t | t โˆˆ Student โˆง ยฌโˆƒc โˆˆ Course (โˆƒe1,e2 โˆˆ Enroll (e1.SID = t.SID โˆง e2.SID = t.SID โˆง e1.CID = c.CID โˆง e2.CID = c.CID โˆง e1.EID โ‰  e2.EID))} (note: e rows identification by rowid)
B. {t | โˆƒe โˆˆ Enroll (e.SID = t.SID)}
C. {t | โˆƒc โˆˆ Course (โˆƒe โˆˆ Enroll (e.SID = t.SID โˆง e.CID = c.CID โˆง COUNT(e)>1))} (COUNT not allowed in pure calculus)
D. {t | t.SID = 1}
โœ… Answer: A
๐Ÿ’ก Solution: Use negated existential over existence of two distinct enrollments (distinct rows) for same student and course; pure relational calculus models row distinctness via multiple tuple variables.


Q92.

Which DRC expression is equivalent to ฯƒ(B=10)(R) for relation R(A,B,C)?
A. {<a,c> | R(a,10,c)}
B. {<a,b> | R(a,b,c) โˆง b=10}
C. {<a,b,c> | b=10}
D. {<b> | b=10}
โœ… Answer: A
๐Ÿ’ก Solution: DRC returns attribute lists; specify the constant in the relation atom and include the attributes to be returned (A and C after selection on B).


Q93.

Which TRC query finds managers who manage exactly one employee? (Emp(EID, MgrID))
A. {t | โˆƒm โˆˆ Emp (m.EID = t.EID โˆง โˆƒe1,e2 โˆˆ Emp (e1.MgrID = m.EID โˆง e2.MgrID = m.EID โˆง e1.EID โ‰  e2.EID) โ‡’ false)} โ€” complex
B. {t | โˆƒm โˆˆ Emp (m.EID = t.EID โˆง โˆƒe โˆˆ Emp (e.MgrID = m.EID) โˆง ยฌโˆƒe2 โˆˆ Emp (e2.MgrID = m.EID โˆง e2.EID โ‰  e.EID))}
C. {t | โˆƒe1,e2 โˆˆ Emp (e1.MgrID = t.EID โˆง e2.MgrID = t.EID โˆง e1.EID โ‰  e2.EID)}
D. {t | t.EID = 1}
โœ… Answer: B
๐Ÿ’ก Solution: B asserts existence of one report and denies existence of a second distinct report; C finds managers with at least two reports (wrong).


Q94.

Which TRC expression returns A values in R that pair with all B values that appear in R? (R(A,B)) โ€” i.e., A values associated with every B in R.
A. {t | โˆƒr โˆˆ R (t.A = r.A โˆง โˆ€b (โˆƒs โˆˆ R (s.B = b) โ‡’ โˆƒs2 โˆˆ R (s2.A = r.A โˆง s2.B = b)))}
B. {t | โˆƒr โˆˆ R (t.A = r.A)}
C. {t | โˆ€b โˆˆ R (t.A = b)}
D. {t | t.A โˆˆ ฯ€_A(R)}
โœ… Answer: A
๐Ÿ’ก Solution: For every B that appears anywhere in R, there must exist an R-tuple linking the candidate A to that B โ€” nested universalโ†’existential pattern captures division semantics across same relation.


Q95.

Which TRC pattern correctly expresses: โ€œThere is no student who scored 100 in all subjectsโ€? (Marks(SID, Subj, Score))
A. {t | ยฌโˆƒs โˆˆ Student (โˆ€m โˆˆ Marks (m.SID = s.SID โ‡’ m.Score = 100))}
B. {t | โˆƒs โˆˆ Student (โˆ€m โˆˆ Marks (m.SID = s.SID โ‡’ m.Score = 100))}
C. {t | โˆ€s โˆˆ Student (โˆƒm โˆˆ Marks (m.Score โ‰  100))}
D. {t | โˆƒm โˆˆ Marks (m.Score โ‰  100)}
โœ… Answer: A
๐Ÿ’ก Solution: Negated existence of a student satisfying universal all-scores=100 expresses “no student has 100 in all subjects.”


Q96.

Given R(A,B,C) and TRC {t | โˆƒr โˆˆ R (t.A = r.A โˆง r.B + r.C > 50)} โ€” which algebraic expression is equivalent?
A. ฯ€_A(ฯƒ(B + C > 50)(R))
B. ฯƒ(B + C > 50)(ฯ€_A(R))
C. ฯ€_A(R)
D. R
โœ… Answer: A
๐Ÿ’ก Solution: Project A from R after selecting tuples where B+C>50.


Q97.

Which TRC query is unsafe due to an unbounded free variable?
A. {t | โˆƒr โˆˆ R (t.A = r.A โˆง x > 100)} where x not range-restricted
B. {t | โˆƒr โˆˆ R (t.A = r.A โˆง r.B > 0)}
C. {t | t โˆˆ R โˆง t.B < 50}
D. {t | โˆƒr โˆˆ R (t.A = r.A)}
โœ… Answer: A
๐Ÿ’ก Solution: Variable x is not bound by any relation atom โ†’ domain-unbounded โ†’ unsafe.


Q98.

Which DRC query denotes the set of pairs <a,b> where R(a,b) holds and there does not exist c with S(b,c)?
A. {<a,b> | R(a,b) โˆง ยฌโˆƒc S(b,c)}
B. {<a,b> | R(a,b) โˆจ โˆƒc S(b,c)}
C. {<a> | โˆƒb R(a,b)}
D. {<b,c> | S(b,c)}
โœ… Answer: A
๐Ÿ’ก Solution: Conjoin R and negated existential on S to ensure no related c exists.


Q99.

Which TRC expression returns departments that have exactly two employees? (Emp(EID,Dept))
A. {t | โˆƒe1,e2 โˆˆ Emp (e1.Dept = t.Dept โˆง e2.Dept = t.Dept โˆง e1.EID โ‰  e2.EID โˆง ยฌโˆƒe3 โˆˆ Emp (e3.Dept = t.Dept โˆง e3.EID โ‰  e1.EID โˆง e3.EID โ‰  e2.EID))}
B. {t | โˆƒe1,e2,e3 โˆˆ Emp (...)} โ€” excessive
C. {t | โˆƒe โˆˆ Emp (t.Dept = e.Dept)}
D. {t | t.Dept = 'D1'}
โœ… Answer: A
๐Ÿ’ก Solution: Existentially assert two distinct employees and negate existence of any third distinct employee in same dept; implements exact-count semantics using pure calculus.


Q100.

Which TRC expression corresponds to SQL SELECT DISTINCT A FROM R WHERE NOT EXISTS (SELECT 1 FROM S WHERE S.B = R.B) (i.e., A values from R whose B not present in S)?
A. {t | โˆƒr โˆˆ R (t.A = r.A โˆง ยฌโˆƒs โˆˆ S (s.B = r.B))}
B. {t | โˆƒr โˆˆ R (t.A = r.A โˆง โˆƒs โˆˆ S (s.B = r.B))}
C. {t | โˆ€r โˆˆ R (t.A = r.A)}
D. {t | ยฌโˆƒr โˆˆ R (r.A = t.A)}
โœ… Answer: A
๐Ÿ’ก Solution: Bind to R to project A and ensure there is no S with same B via negated existential โ€” direct calculus translation of the SQL anti-join.

About the Author

examhopeinfo@gmail.com

Administrator

Visit Website View All Posts

Post navigation

Previous: Structural Query Language(SQL) MCQs for Gate exam
Next: Serializability MCQs for Gate Exam

Related News

Vivo X200 Price Drop
  • IT
  • Current Affairs
  • Tech News

Vivo X200: เคœเคพเคจเฅ‡ เค•เคฟเคคเคจเฅ€ เค•เคฎ เค•เฅ€เคฎเคค เคชเคฐ เคฎเคฟเคฒ เคฐเคนเคพ เคฏเฅ‡ 9400 เคฎเคฟเคกเคฟเคฏเคพ เคŸเฅ‡เค• เคชเฅเคฐเฅ‹เคธเฅ‡เคธเคฐ เคตเคพเคฒเคพ เคธเฅเคฎเคพเคฐเฅเคŸเคซเฅ‹เคจ

examhopeinfo@gmail.com December 23, 2025 0
Samsung Galaxy S25 Plus
  • IT
  • Current Affairs
  • Tech News

Samsung Galaxy S25 Plus เคชเคฐ เคฎเคฟเคฒ เคฐเคนเฅ€ เคญเคพเคฐเฅ€ เค›เฅ‚เคŸ ,เคœเคพเคจเฅ‡ เคธเฅ‡เคฒ เคชเฅเคฐเคพเค‡เคธ

examhopeinfo@gmail.com December 22, 2025 0
Electricity bill saving Smart Plug
  • IT
  • Current Affairs
  • Tech News

AI เค•เฅ‡ เค‡เคธ เฅ›เคฎเคพเคจเฅ‡ เคฎเฅ‡เค‚ เค•เฅˆเคธเฅ‡ เคฌเคฟเคœเคฒเฅ€ เคฌเคšเคพ เคฐเคนเฅ‡ เคนเฅˆเค‚ เคฏเคน เคธเฅเคฎเคพเคฐเฅเคŸ เคชเฅเคฒเค—?

examhopeinfo@gmail.com December 21, 2025 0

Recent Posts

  • Vivo X200: เคœเคพเคจเฅ‡ เค•เคฟเคคเคจเฅ€ เค•เคฎ เค•เฅ€เคฎเคค เคชเคฐ เคฎเคฟเคฒ เคฐเคนเคพ เคฏเฅ‡ 9400 เคฎเคฟเคกเคฟเคฏเคพ เคŸเฅ‡เค• เคชเฅเคฐเฅ‹เคธเฅ‡เคธเคฐ เคตเคพเคฒเคพ เคธเฅเคฎเคพเคฐเฅเคŸเคซเฅ‹เคจ
  • Samsung Galaxy S25 Plus เคชเคฐ เคฎเคฟเคฒ เคฐเคนเฅ€ เคญเคพเคฐเฅ€ เค›เฅ‚เคŸ ,เคœเคพเคจเฅ‡ เคธเฅ‡เคฒ เคชเฅเคฐเคพเค‡เคธ
  • AI เค•เฅ‡ เค‡เคธ เฅ›เคฎเคพเคจเฅ‡ เคฎเฅ‡เค‚ เค•เฅˆเคธเฅ‡ เคฌเคฟเคœเคฒเฅ€ เคฌเคšเคพ เคฐเคนเฅ‡ เคนเฅˆเค‚ เคฏเคน เคธเฅเคฎเคพเคฐเฅเคŸ เคชเฅเคฒเค—?
  • เค•เฅเคฏเคพ เคนเฅˆ เคฏเคน GhostPairing Scam เค”เคฐ เคฌเคฟเคจเคพ เคชเคพเคธเคตเคฐเฅเคก เค”เคฐ เคธเคฟเคฎ เค•เฅ‡ เค•เฅเคฏเฅ‹เค‚ เคนเฅ‹ เคฐเคนเคพ เคนเฅˆ เคตเฅเคนเคพเคŸเฅเคธเคชเฅเคช เค…เค•เคพเค‰เค‚เคŸ เคนเฅˆเค•
  • Leica เค•เฅˆเคฎเคฐเฅ‡ เค•เฅ‡ เคธเคพเคฅ เคœเคฒเฅเคฆ เคฒเฅ‰เคจเฅเคš เคนเฅ‹ เคธเค•เคคเคพ เคนเฅˆ Xiaomi Ultra 17

At ExamHope, we understand that preparing for exams can be challenging, overwhelming, and sometimes stressful. Thatโ€™s why we are dedicated to providing high-quality educational resources, tips, and guidance to help students and aspirants achieve their goals with confidence. Whether you are preparing for competitive exams, school tests, or professional certifications, ExamHope is here to make your learning journey smarter, easier, and more effective.

Quick links

  • About us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA Policy

Category

  • Computer Network
  • Computer Organization and Architecture
  • Data Structures
  • C Language
  • Theory of Computation
  • Database

You may have missed

Vivo X200 Price Drop
  • IT
  • Current Affairs
  • Tech News

Vivo X200: เคœเคพเคจเฅ‡ เค•เคฟเคคเคจเฅ€ เค•เคฎ เค•เฅ€เคฎเคค เคชเคฐ เคฎเคฟเคฒ เคฐเคนเคพ เคฏเฅ‡ 9400 เคฎเคฟเคกเคฟเคฏเคพ เคŸเฅ‡เค• เคชเฅเคฐเฅ‹เคธเฅ‡เคธเคฐ เคตเคพเคฒเคพ เคธเฅเคฎเคพเคฐเฅเคŸเคซเฅ‹เคจ

examhopeinfo@gmail.com December 23, 2025 0
Samsung Galaxy S25 Plus
  • IT
  • Current Affairs
  • Tech News

Samsung Galaxy S25 Plus เคชเคฐ เคฎเคฟเคฒ เคฐเคนเฅ€ เคญเคพเคฐเฅ€ เค›เฅ‚เคŸ ,เคœเคพเคจเฅ‡ เคธเฅ‡เคฒ เคชเฅเคฐเคพเค‡เคธ

examhopeinfo@gmail.com December 22, 2025 0
Electricity bill saving Smart Plug
  • IT
  • Current Affairs
  • Tech News

AI เค•เฅ‡ เค‡เคธ เฅ›เคฎเคพเคจเฅ‡ เคฎเฅ‡เค‚ เค•เฅˆเคธเฅ‡ เคฌเคฟเคœเคฒเฅ€ เคฌเคšเคพ เคฐเคนเฅ‡ เคนเฅˆเค‚ เคฏเคน เคธเฅเคฎเคพเคฐเฅเคŸ เคชเฅเคฒเค—?

examhopeinfo@gmail.com December 21, 2025 0
Ghost Pairing Scam on Whatsapp
  • IT
  • Current Affairs
  • Tech News

เค•เฅเคฏเคพ เคนเฅˆ เคฏเคน GhostPairing Scam เค”เคฐ เคฌเคฟเคจเคพ เคชเคพเคธเคตเคฐเฅเคก เค”เคฐ เคธเคฟเคฎ เค•เฅ‡ เค•เฅเคฏเฅ‹เค‚ เคนเฅ‹ เคฐเคนเคพ เคนเฅˆ เคตเฅเคนเคพเคŸเฅเคธเคชเฅเคช เค…เค•เคพเค‰เค‚เคŸ เคนเฅˆเค•

examhopeinfo@gmail.com December 21, 2025 0
Copyright ยฉ All rights reserved for ExamHope. | MoreNews by AF themes.
Go to mobile version