Skip to content

令和4年度 ITパスポート試験 問98

This question's explanation and your answers so far.

問98
頻出度★★☆

関係データベースで管理している“従業員”表から,氏名の列だけを取り出す操作を何というか。 従業員

従業員番号氏名所属コード
H001試験花子G02
H002情報太郎G01
H003高度次郎G03
H004午前桜子G03
H005午後三郎G02
出典 令和4年度 ITパスポート試験 問98
解説

問 98

  • Incorrectア

    Join is an operation that links multiple tables by the values of a shared column (key) and combines them into a single table. Here we only extract a column from one table, so it does not apply.

  • イ

    正解 Projection is a relational operation that extracts specific “columns” from a table in a relational database. The question asks for the operation of extracting only the “Name” column from the “Employees” table, which is exactly the act of pulling out columns, so projection is the correct answer. It helps to remember them as a pair: narrowing down “rows (records)” by a condition is selection, while narrowing down “columns” is projection.

  • Incorrectウ

    Selection is an operation that extracts “rows (records)” matching a condition from a table. Because it narrows down rows rather than columns, it is the opposite of projection and is not the operation of extracting the name column.

  • Incorrectエ

    Union is a set operation that merges the rows of two tables with the same column structure while removing duplicates. It is unrelated to the operation of extracting a column from a single table.

ここがポイント
  • Projection = the operation of extracting the needed “columns” from a table; selection = the operation of extracting “rows” that match a condition. Distinguish them as a column-vs-row pair.
  • The basics of relational operations: selection, projection, and join. Union, difference, and product are organized separately as set operations (operations between rows).
用語

Your answers