CMPUT 291 2022_09_19
2022年9月19日
CMPUT 291 2022_09_19
sql and 关系代数
EG.找到薪水大于50k的人的名字与电话
SELECT name, phone
FROM emp
WHERE salary > 50000
//RC
{<e.name,e.phone>|emp(e)^e.salaet > 50000}
RA
RC
- domin : set of relations
- operators:
- basic: selection prseject cartesian product renaming union set diff
- join set intersection division
- some features:
- good to describe evaluation steps
- can optimze the steps