CMPUT 291 2022_09_19

0x7FFFFFFF2022年9月19日
小于 1 分钟

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