关系演算
以数理逻辑中的谓词演算为基础
元组关系演算语言ALPHA
由E.F.Codd提出,以数理逻辑中的谓词演算为基础
语句
检索语句(查询)
GET
更新语句
PUT,HOLD,UPDATE,DELETE,DROP
一、检索操作
(1) 简单检索(即不带条件的检索)
(2) 限定的检索(即带条件的检索)
(3) 带排序的检索
(4) 带定额的检索
(5) 用元组变量的检索
(6) 用存在量词的检索
(7) 带有多个关系的表达式的检索
(8) 用全称量词的检索
(9) 用两种量词的检索
(10) 用蕴函(Implication)的检索
(1)简单检索
GET W (SC.Cno)
GET W (Student)
(2)限定的检索
[例3]查询信息系(IS) 年龄小于20岁的学号和年龄。
GET W (Student.Sno,Student.Sage): Student.Sdept='IS'∧student.Sage<20
GET W (Student.Sname,SC.grade): SC.CNO=1 ∧ Student.Sno=SC.Sno
(3)带排序的检索
GET W (Student.Sno,Student.Sage): Student.Sdept='CS' DOWN Student.Sage
(4)带定额的检索
GET W (3) (Student.Sno,Student.Sage): Student.Sdept='IS' DOWN Student.Sage