I have the following problem and i hope you could help me.

Given is the following database schema,

Student($\underline{\text{MatNo}}$, SName)

Course($\underline{\text{CNo}}$, CName)

Took($\underline{\text{CNo -> Course, MatNo -> Student}}$, Score)

And the two the relational queries.

a) γ count(∗)→cnt ( π CNo (Course))

b) γ count(∗)→cnt ( π CNo,CName (Course))

My question is are the two queries equivalent assuming sets or are they equivalent assuming multisets?

I thought they are equivalent if we assuming sets and not equivalent if we assuming multisets. Could I be right? My problem is that I do not understand the difference between two keys in the query and just one key.

  • $\begingroup$ Has no body an idea? $\endgroup$ – Joshua.M Jun 19 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.