0

This is about relational algebra,

I have a table and im always having the problem of not being able to project what I want, but I think im almost right. For example, in this case I need to find all the pizzerias that female customers attend,

this is my algorithm πname Frequents ⨝(πname σgender='female' Person) , in this case, I found all the names of each customer, and on the Frequents Table I want to display the pizzerias. How would I be able to do so? I thought about doing

πpizzeria (πname Frequents ⨝(πname σgender='female' Person) Frequents or

πpizzeria σname = (πname Frequents ⨝(πname σgender='female' Person) Frequents

but it gives me an error. The tables are on the photo. Thank you in advance!

the whole group is on this pasteit file here

philipxy
  • 14,867
  • 6
  • 39
  • 83
kostis14
  • 21
  • 3
  • Please [use text, not images/links, for text--including tables & ERDs](https://meta.stackoverflow.com/q/285551/3404097). Paraphrase or quote from other text. Give just what you need & relate it to your problem. Use images only for what cannot be expressed as text or to augment text. Include a legend/key & explanation with an image. Nested algebra calls form a programming language. So give as much of a [mre] as you can. But--Google 'run relational algebra online'. [ask] [Help] [Re homework questions.](https://meta.stackoverflow.com/q/334822/3404097) PS "it gives me an error" is not helpful. – philipxy Apr 06 '22 at 04:47
  • [Re relational querying.](https://stackoverflow.com/a/24425914/3404097) PS What is your 1 question? Please *either* ask about what you misunderstood in a wrong attempt or ask about how you are stuck getting to your goal along with working parts; not both. Say why you coded or would code with justification per authoritative documentation. 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. PS Did you run this? Where? PS That is not minimal representative input. – philipxy Apr 06 '22 at 05:00

0 Answers0