Tuple Relational Calculus in a DBMS

  • Thread starter Thread starter momentum
  • Start date Start date
  • Tags Tags
    Calculus
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 2K views
momentum
Messages
111
Reaction score
0
<Moderator's note: Moved from a technical forum and thus no template.>

I'm solving a problem using tuple relational calculus ( TRC) in DBMS.

Problem
Find the name of all the employees who work for XYZ Bank Corporation.

Solution ( as given in my book)

tKsmNP0.png


I don't understand why book is using S . We have t . Since both of them represents tuples , we could just use t in place of S and get moving.

Can anyone please explain why we required S ?
 

Attachments

  • tKsmNP0.png
    tKsmNP0.png
    27.2 KB · Views: 499
Last edited by a moderator:
Physics news on Phys.org
t is a tuple that contains only the name of an employee, so it is not a member of WORKS. I think the exporesson for the query should start with {t : {emp_name} | ∃S ∈ WORKS ...
 
willem2 said:
t is a tuple that contains only the name of an employee, so it is not a member of WORKS. I think the exporesson for the query should start with {t : {emp_name} | ∃S ∈ WORKS ...
It returns t or S ?
 
momentum said:
It returns t or S ?

The entire expression {t: {emp_name} | ∃ S ∈ WORKS ( ... ) } defines a relation that is a set of tuples with just one attribute. (only the names of the employess of XYZ). t is used, because we only want the employee names, not the comp_names
 
willem2 said:
The entire expression {t: {emp_name} | ∃ S ∈ WORKS ( ... ) } defines a relation that is a set of tuples with just one attribute. (only the names of the employess of XYZ). t is used, because we only want the employee names, not the comp_names
okay ...my confusion here is ,
we call t as tuple.
do we also call S as tuple here ? Yes/No ?
 
momentum said:
okay ...my confusion here is ,
we call t as tuple.
do we also call S as tuple here ? Yes/No ?
S is an element of the WORKS relationship, so it must be a tuple.
 
  • Like
Likes   Reactions: momentum