in Databases
1,046 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?

in Databases
by
1.0k views

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