667 views
0 0 votes

Which of the following Queries is more Efficient on the given data?

1. In terms of Space.
2. In terms of Calculation. also, How many calculations are necessary for Each?

 

1 Answer

0 0 votes

In terms of space :second relational expression is efficient. Because the final table on which conditions will be applied contains 3 attributes only  whereas in first relational expression the  table on which the conditions are applied will contain more than  3 attributes.  obviously the smaller the table , more space efficient it would be.

and the number of calculations is equal for both the relational expressions .

Position:
Show:

Related questions

0 0 votes
1 1 answer
154
154 views
GO Classes asked Sep 25
154 views
Consider $\mathrm{Flights}(\mathrm{num},\mathrm{src},\mathrm{dst})$, where each tuple represents a directed flight from $\mathrm{src}$ to $\mathrm{dst}$.Let $\mathrm{F}_1...
0 0 votes
1 1 answer
118
118 views
GO Classes asked Sep 25
118 views
Consider $\mathrm{Employee}(\mathrm{eid},\mathrm{name},\mathrm{salary})$, $\mathrm{Project}(\mathrm{pid},\mathrm{title},\mathrm{budget})$, and $\mathrm{WorksOn}(\mathrm{e...
2 2 votes
1 1 answer
106
106 views
GO Classes asked Sep 25
106 views
Consider $\mathrm{Locations}(\mathrm{locationid},\mathrm{name},\mathrm{state},\mathrm{altitude})$$\mathrm{TreeCoverage}(\mathrm{locationid},\mathrm{treetype},\mathrm{year...
1 1 vote
1 1 answer
72
72 views
GO Classes asked Sep 25
72 views
Let $\mathrm{R}(\mathrm{A},\mathrm{B})$ and $\mathrm{S}(\mathrm{A},\mathrm{B})$ be relations under set semantics.Which expression is not always equivalent to the others?$...