Skip to content

平成30年度 春期 ITパスポート試験 問65

This question's explanation and your answers so far.

問65
頻出度★★☆

関係データベースの操作 a~c と,関係演算の適切な組合せはどれか。  a 指定したフィールド(列)を抽出する。  b 指定したレコード(行)を抽出する。  c 複数の表を一つの表にする。

出典 平成30年度 春期 ITパスポート試験 問65
解説

問 65

  • Incorrectア

    This choice assigns a=Join, b=Projection, c=Selection, and all three are wrong. Extracting columns (a) should be Projection, extracting rows (b) should be Selection, and combining tables (c) should be Join, so every assignment is misaligned.

  • Incorrectイ

    a=Projection is correct, but it treats the row extraction in b as ‘Join’ and the table combining in c as ‘Selection’, which are wrong. Extracting rows is Selection, and combining multiple tables into one is Join.

  • ウ

    正解 Apply the three basic relational-algebra operations to each operation. In a, ‘extract specified fields (columns)’ takes out data in the vertical direction (columns), so it is Projection; in b, ‘extract specified records (rows)’ takes out data in the horizontal direction (rows) by a condition, so it is Selection; in c, ‘combine multiple tables into one table’ joins tables together on common items, so it is Join. Therefore a=Projection, b=Selection, c=Join, and this combination is choice ウ, which is correct.

  • Incorrectエ

    c=Join is correct, but it treats the column extraction in a as ‘Selection’ and the row extraction in b as ‘Projection’, so Selection and Projection are swapped. Taking out columns is Projection, and taking out rows is Selection.

ここがポイント
  • Relational-algebra basics: Projection = extracting specified columns (fields), Selection = extracting specified rows (records), Join = combining multiple tables into one on common items.
  • The key point of this question is not to mix up the correspondence that Projection matches columns (vertical) and Selection matches rows (horizontal).
用語

Your answers