Relational Algebra & Calculus


Answer & solution
Answer: π_PNAME(PUBLISHER). (no official key was published)
The requested output is a single attribute, PNAME, from every tuple of PUBLISHER. Projection selects columns, so the expression is π_PNAME(PUBLISHER). No selection predicate is needed because no publisher is to be filtered out, and no join is needed because the required data already reside in one relation.
Under classical relational algebra, relations are sets, so projection returns each distinct publisher name once. If two stored tuples happen to share a name, the output still contains that value once. The result schema consists only of PNAME, not PCITY.
It would be incorrect to obtain these names by projecting BOOK: that would return only publishers represented by at least one recorded book, whereas the query asks for all publishers. Similarly, joining PUBLISHER with BOOK first could incorrectly lose a publisher with no matching book. DIVIDE is also unnecessary: there is no requirement involving all members of another relation. This simple query tests matching the requested output columns and population directly to the base relation.