Given this problem:
Consider a relation
geq
which represents “greater than or equal to”, that is, (x,y)E geq only if y < x.create table geq ( lb integer not null , ub integer not null , primary key lb , foreign key (ub) references geq on delete cascade )
Which of the following is possible if a tuple (x,y) is deleted?
(a) A tuple (z,w) with z > y is deleted
(b) A tuple (z,w) with z > x is deleted
This is how I am trying to solve it :-
Since ub (upper bound) is the foreign key, in the tuple (x,y) , y is the foreign key.
Given, the foreign key (y) references on table geq
itself, there must a tuple ( y , y' ) in geq.
Now, y >= x and y' >= y. Therefore, y' >= x.
So instead of using (z,w) i used (y,y').
So, shouldn't the answer be, A tuple (z,w) with w>x is deleted ?
(I am trying to solve an old GATE paper)