GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 27(b)

Interpreting authors read by a hometown group

Database Management Systems · Relational Algebra & Calculus · Full GATE CSE 1996 paper

GATE 1996, Q27(b) Descriptive
Report issue

Relational Algebra & Calculus

Question 27(b), GATE 1996: Relations are USERS(User#,UserName,HomeTown), BOOKS(Book#,BookTitle,AuthorName), and ISSUED(Book#,User#,Date). Natural joins match the identically named key attributes. Explain in one English sentence the query π_AuthorName(BOOKS ⋈ σ_HomeTown='Delhi'(USERS ⋈ ISSUED)). Use the projection and natural-join symbols visible in GFG; GateForum misprints/degrades these operators.
Question 27(b), GATE 1996: Relations are USERS(User#,UserName,HomeTown), BOOKS(Book#,BookTitle,AuthorName), and ISSUED(Book#,User#,Date). Natural joins match the identically named key attributes. Explain in one English sentence the query π_AuthorName(BOOKS ⋈ σ_HomeTown='Delhi'(USERS ⋈ ISSUED)). Use the projection and natural-join symbols visible in GFG; GateForum misprints/degrades these operators.
Tap to enlarge
Answer & solution

Answer: Names of authors with at least one book issued to a Delhi-hometown user. (no official key was published)

One-sentence answer: It returns the names of authors having at least one book recorded as issued to a user whose hometown is Delhi.

The inner natural join USERS ⋈ ISSUED matches each issue to its borrower through User#. Selecting HomeTown='Delhi' retains issue records belonging to Delhi users; the condition describes the borrower's hometown, not the author's residence or the book's publication place. The join with BOOKS matches Book# and adds the author of each surviving issued book. Projection onto AuthorName then discards every other attribute.

Under set semantics each distinct author name appears once, even if several Delhi users borrowed that author's books or one user borrowed several such books. The condition is existential: one qualifying issue suffices. It does not require that all books by the author have been issued, that every Delhi user has read the author, or that the author is popular by any numerical threshold. Likewise nothing in the given schema tests whether a book has since been returned. If no Delhi user has any issue record, the result is empty. Two different people who happen to share AuthorName are not distinguished by this schema and projection; the result is a set of names rather than necessarily unique real-world author identities.

Original paper, page 10