関係データベースで管理している“従業員”表から,氏名の列だけを取り出す操作を何というか。 従業員
| 従業員番号 | 氏名 | 所属コード |
|---|---|---|
| H001 | 試験花子 | G02 |
| H002 | 情報太郎 | G01 |
| H003 | 高度次郎 | G03 |
| H004 | 午前桜子 | G03 |
| H005 | 午後三郎 | G02 |
This question's explanation and your answers so far.
関係データベースで管理している“従業員”表から,氏名の列だけを取り出す操作を何というか。 従業員
| 従業員番号 | 氏名 | 所属コード |
|---|---|---|
| H001 | 試験花子 | G02 |
| H002 | 情報太郎 | G01 |
| H003 | 高度次郎 | G03 |
| H004 | 午前桜子 | G03 |
| H005 | 午後三郎 | G02 |
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.
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.
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.