-1

so im stuck in this exercise where I need to translate relational algebra (unary relational operations) expressions based on the Mondial III database to natural language and I need help for the last two and if I have any errors in the ones I answered. BTW i used 6 for sigma (SELECT operation) and |><| for the THETA JOIN operation (couldn't find the sigma or the real theta join operator on my keyboard sorry about that) Any help is much appreciated!Thanks in advance. Here's the meaning for symbols : SELECT : Selects all tuples that satisfy the selection condition from a relation R :

6selection condition(R)

PROJECT : Produces a new relation with only some of the attributes of R, and removes duplicates tuples :

πattribute list(R)

THETHA JOIN : Produces all combinations of tuples from R1 and R2 that satisfy the join condition :

R1< |><|join condition >(R2)

πname(6elevation>1000(MOUNTAIN)) -> Find the name of all mountains whose elevation is higher than 1000.

6elevation>1000(6population>100000(CITY)) -> Select the city's tuples whose elevation is higher than 1000 with a population greater than 100000

6population>100000(6elevation>1000(CITY)) -> Select the city's tuples whose population is greater than 100000 with an elevation higher than 1000

COUNTRY|><|code=country(LANGUAGE) -> ?

πCountry.name(COUNTRY|><|code=country(6Language.name='English' AND percentage>50(LANGUAGE)) -> ?

1010l0gic
  • 9
  • 3
  • Ask 1 specific researched non-duplicate question re where/how you are 1st stuck/unsure. [ask] [Help] [How do I ask and answer homework questions?](https://meta.stackoverflow.com/q/334822/3404097) PS There are many RAs (relational algebras). They differ in operators & even what a relation is. Give operator definitions & your reference for yours. Eg textbook name, edition & page. Nested algebra calls form a programming language. So give as much of a [mre] as you can. But--Google 'run relational algebra online'. Please show what parts you are able to do. PS Google 'unicode join' etc. – philipxy Feb 12 '22 at 22:29
  • Put what is needed to ask your question in your post, don't just give sources/links. Don't expect us to google or to read entire pages/documents. Please act on all of what's in the comments. PS It's not omega it's sigma. Or just use words. (But operator names are not operator definitions.) – philipxy Feb 12 '22 at 22:42
  • When giving a business relation(ship)/association or table (base or query result), say what a row in it states about the business situation in terms of its column values. [Re relational querying.](https://stackoverflow.com/a/24425914/3404097) – philipxy Feb 12 '22 at 22:51

1 Answers1

0

The fourth expression returns all the informations about the countries together with all the languages spoken (the information about the country is repeated for each different language spoken).

The fifth expression return the name of all the countries where the prevalent language is English.

Renzo
  • 26,848
  • 5
  • 49
  • 61