如何将带有JOIN的SQL查询正确转换为TRC?

时间:2018-11-03 17:04:19

标签: sql tuple-relational-calculus

我有下一个SQL查询:

SELECT e.name FROM employee AS e WHERE e.emp_id =
(SELECT c.emp_id FROM certified AS c
JOIN aircraft as a
ON c.aircraft_id = a.aircraft_id
WHERE a.model = 'ABC');

我试图以另一种方式将此SQL转换为TRC:

{
    e.name | e ∈ employee ^
           ∃ c ∈ certified ^
           ∃ a ∈ aircraft 
    e.name = (
        c.aircraft_id = a.aircraft_id ^
        a.model = 'ABC'
}

但是我不确定我是否正确写下了JOIN部分。有人可以告诉我如何正确地将JOIN部分转换为TRC吗?

0 个答案:

没有答案