search
Log In
1 vote
216 views

Consider the following relation and instance of relation:

Supply(sid,Sname)  #sid is key

Parts(pid,Pname,Pcolor)  #pid is the key

Catalog(sid,pid)  #sid,pid is the key

Number of tuples returned by the above Query is ……...

in Databases 216 views
0
6?
0
Mine was 6 too but its 0
0
I think 100,null  on comparing with 100,5 will return false in SQL but not sure in RA. Maybe we have treat it the same here as well

1 Answer

2 votes
Answer is 0. Bcoz no violet color in parts table.

(In cross product if any one of the table contains 0  record then no tuples will be selected.)
0

According to truthtable of subtraction

A B A-B
0 0 0
0 1 1
1 0 1
1 1 0

So,we will get 6 values.

0
what method is this? Can u explain?

Related questions

0 votes
1 answer
1
227 views
Consider a relation R(A, B) that contains r tuples, and a relation S(B, C) that contains s tuples; assume r > 0 and s > 0. Make no assumptions about keys. For the following relational algebra expression, in terms of r and s the minimum and maximum number of tuples that could be in the result?
asked Dec 7, 2018 in Databases ankuyadav17 227 views
0 votes
1 answer
2
251 views
Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost) Find the pids of the most expensive parts supplied by suppliers named Yosemite Sham
asked May 8, 2019 in Databases aditi19 251 views
1 vote
3 answers
3
2.1k views
Given two relations R1 and R2, where R1 contains N1 tuples, R2 contains N2 tuples, and N2>N1> 0, give the minimum and maximum possible sizes (in tuples) for the result relation produced by each of the following relational algebra expressions. In each case, state any assumptions about ... difference) $R1 X R2$ (cartesian product) $σa=5(R1)$ (selection) $\pi a(R1)$ (projection) $R1/R2$ (division)
asked Apr 11, 2019 in Databases aditi19 2.1k views
0 votes
0 answers
4
...