1,041 views
0 votes
0 votes

Question:- a query to find the set of all courses taught in the Fall 2009 semester, the Spring 2010 semester, or both. 

Table given:-

 

Given Relational Algebra expression:-

Doubt:-

If I write the relational Algebra expression as this

$\prod course\_id \ (( \sigma semester="Fall" \Lambda year=2009) \ V (\sigma semester="Spring" \Lambda year=2010)\ ) (section)$

then does it gives same output as they had given in terms of union

The output is highlighted in image?

1 Answer

0 votes
0 votes
No, Your Query is Syntactically wrong.

Following is correct :

$\prod course\_id \ (( \sigma semester="Fall" \Lambda year=2009(section)) \ U (\sigma semester="Spring" \Lambda year=2010 (section))\ ) $

Now you can check where you went wrong by comparing the two Queries.

Related questions

0 votes
0 votes
2 answers
4
Priyansh Singh asked Mar 27, 2019
1,558 views
Consider two relations R1 , R2 with N1 and N2 tuples where N2 N1 0, what are the minimum and maximum rows for the RA expression R2/R1 ?