Вопрос

how would you convert this Select query to relational algebra:

SELECT Student.Name, Result.Mark
FROM Student, Results
WHERE Student.ID = Results.ID AND Results.Code = 'G51DBS'

This is what I have but I'm not sure:

[σ{Student.Name}(Student)]∪[Π{Result.Makr}σ{Student.ID = Results.ID ∧ results.code = g51dbs}(Results)]
Это было полезно?

Решение

I think it should be like this:

∏Name,Mark (σResult.Code="G51DBS"(Student⋈Result))

You might want to look at this tutorial and for Natural join this

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top