选择(续) 令3)选择运算是从关系尺中选取使逻辑表达式F为真 的元组,是从行的角度进行的运算 0 An Introduction to Database System
An Introduction to Database System 选择(续) ❖3) 选择运算是从关系R中选取使逻辑表达式F为真 的元组,是从行的角度进行的运算 σ
选择(续) [例1查询信息系(S系)全体学生 adept =s(Student) 或05=( Student 结果: Sno Sname Ssex Sage Sdept 200215122刘晨 女 200215125张立 男 19 An Introduction to Database System
An Introduction to Database System 选择(续) [例1] 查询信息系(IS系)全体学生 σSdept = 'IS' (Student) 或 σ5 ='IS' (Student) 结果: Sno Sname Ssex Sage Sdept 200215122 刘晨 女 19 IS 200215125 张立 男 19 IS
选择(续) 例2]查询年龄小于20岁的学生 Osage s 2o ( Student) 或σ4≤20( Student 结果 Sno Sname Ssex Sage Sdept 200215122 刘晨 女 19 200215123王敏 女 18 MA 200215125张立 男 19 An Introduction to Database Syster
An Introduction to Database System 选择(续) [例2] 查询年龄小于20岁的学生 σSage < 20(Student) 或 σ4 < 20(Student) 结果: Sno Sname Ssex Sage Sdept 200215122 刘晨 女 19 IS 200215123 王敏 女 18 MA 200215125 张立 男 19 IS
2.投影( Projection) ◆1)投影运算符的含义 从尺中选择出若干属性列组成新的关系 Tn(={4]t∈R} A:R中的属性列 An Introduction to Database System
An Introduction to Database System 2. 投影(Projection) ❖1)投影运算符的含义 ▪ 从R中选择出若干属性列组成新的关系 πA (R) = { t[A] | t R } A:R中的属性列
2.投影( Projection) ☆2)投影操作主要是从列的角度进行运算 但投影之后不仅取消了原关系中的某些列,而且还可 能取消某些元组(避免重复行) An Introduction to Database System
An Introduction to Database System 2. 投影(Projection) ❖2)投影操作主要是从列的角度进行运算 ▪ 但投影之后不仅取消了原关系中的某些列,而且还可 能取消某些元组(避免重复行) π