IPA FE Subject A sample Question 24
A question IPA Japan published in 基本情報技術者試験 科目A サンプル問題 問24, translated into English. ITPEC is based on the same exams.
In the relational model, which of the following is the relational operation that obtains table Y from table X?
X
Y
Explanation
Projection — Y keeps every row of X but only two of its columns, ProductNumber and Quantity.
Compare the two tables. Y has the same five rows as X (A01, A02, B01, B05, B06), with the same quantities, so no row was dropped. What changed is the columns: ProductName and Price are gone. Picking out columns of one table is projection; in SQL it is SELECT ProductNumber, Quantity FROM X.
Answer (b)
Why not others:
- •(a) — a join combines two tables on a common column; here there is only one table and nothing was added
- •(c) — selection picks out the rows that meet a condition and keeps all columns; Y has every row of X but fewer columns
- •(d) — a merge (union) puts the rows of two tables with the same columns together into one; again only one table is involved
Key rule: Selection cuts a table horizontally (rows), projection cuts it vertically (columns), and a join puts two tables side by side on a common column.
Databases · AI-written, may contain errors
This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.