in Databases edited by
1,009 views
1 vote
1 vote
  1. {t∣∃u∈R1(t[A]=u[A])∧¬∃s∈R2(t[A]=s[A])}

  2. {t∣∀u∈R1(u[A]="x"⇒∃s∈R2(t[A]=s[A]∧s[A]=u[A]))} 

Someone please explain how to read this queries or what does each query means in simple English. 

I know, bounded and free variables and also I know, only one tuple variable ranges over whole relation then what is this u? 

These are from - https://gateoverflow.in/742/gate2001-2-24

in Databases edited by
by
1.0k views

4 Comments

May anyone of you please explain!

@Akash Kanase 

@srestha

@Manu Thakur

@Anu007

​​​​​​​@Rishabh Gupta 2

0
0
@joshi_nitish help please
0
0

As name says it applied on tupple i.e. rows.

Since for your question table and schema not given so i took my example:

 Suppliers (SID, Sname, Rating) 2. Parts (PID, Pname, Color) 3. Catalog (SID,PID, Cost)

take one query :  Sname of suppliers who supplied some part

how you do it in  SQL is my leaving to you. ok

now comes to TRC:

now how TRC work is

Take 1st Row of supplier

( all row of one by one but after one row over than 2nd row of catalog and check (s.sid= c.cid ) and select the name of supplier)

take small database and run that way you will get that:

the thing is whole row is chceked in one pass unlike 1st do s.sid = c.cid for all rows then select

1
1
for first one it is simply says that there exist some record of attribute of A in R1 and not exist in R2=>R1-R2 .
0
0

Please log in or register to answer this question.

Related questions