關聯式資料庫中,原本已有一個關聯(relation)表 Employee,其屬性(attributes)包括 id、name、gender、address。屬性 gender 記錄員工的性別,男性員工的 gender 欄位標記為 male,女性員工的 gender 欄位標記為 female。對關聯表 Employee 使用下列那一個關聯運算,可以產生只包含男性員工元組(tuples)的資料表?
Aselect正確答案
Bintersection
Cjoin
Dupdate
答案與詳解
select(σ)是關聯代數中用條件篩選 tuple 的運算,σ_gender='male'(Employee) 即可得到只含男性員工的資料表,完全符合題意。
