分两大类:
1。set-theoretic operations
name symbol keyboard form che
union union 并 intersect 交
difference – minus 差
//前三类是要条件的,就像矩阵运算一样
条件:大概意思是 狗只能跟狗比,不能跟猫比
product * times 笛卡儿积
2。native relational operations
project r[] r[] 取其中几列
select r where c r where c 就像sql中的select * from c 一样
join join 合并:所有“共有列”一样的record才保留
division / dividby 除以
// if the table r is defined by r = t*s,then it is true that t = r dividby s.
example 2.96(表格跟见上篇文章)
0 := orders –alias
get cids of customers who order all products that anybody orders.this is division again,and the divisor,the list of “all” products,must be projected from orders rather than products.
0[cid,pid]/0[pid]
