関係データベースにおける結合操作はどれか。
令和5年度 ITパスポート試験 問100
This question's explanation and your answers so far.
問 100
Incorrectア
This describes selection. It extracts records (rows) that satisfy a specific condition from a single table, which differs from a join that combines two tables.
Incorrectイ
This describes projection. It extracts only specific fields (columns) from a single table, and is not a join.
Incorrectウ
Although handling two tables resembles a join, ‘extracting records that have the same value’ is closer to a set operation like intersection, and does not match the join definition that links rows side by side by matching field values.
- エ
正解 The correct answer is エ. A join in a relational database is the operation of combining two tables into one by matching the values of a shared field. For example, relating an ‘employee table’ and a ‘department table’ by the department-code value yields a table that, for each employee, also includes its department name. Choice エ, ‘create a table by relating two tables based on field values’, is exactly this definition, so it is correct.
- The key point is distinguishing the three main relational database operations: selection (extracting rows by condition), projection (extracting columns), and join (relating two tables by field values).
- A join is the operation of integrating multiple tables into one using the values of a shared field as the key.