calculates any relational algebra statement like ( σ a > 42 ( A ) ) ⋈ ( π a,b ( B ) )
on a set of relations.
If you want to learn SQL you take a database system and try some queries.
But if you want to learn relational algebra what do you use? Pen and paper?
The relational algebra calculator helps you learn relational algebra (RelAlg) by executing it.
suId | name |
---|---|
0 | Computing |
1 | Maths |
2 | English |
3 | History |
stId | name |
---|---|
1 | John |
2 | Mike |
3 | Lisa |
4 | Julia |
suId | stId | mark |
---|---|---|
0 | 1 | A |
0 | 2 | B |
0 | 3 | C |
0 | 4 | A |
2 | 2 | A |
3 | 2 | F |
4 | 1 | C |
Name | Source | Language |
---|---|---|
Kemper Datenbanksysteme | Alfons Kemper, André Eickler: Datenbanksysteme: Eine Einführung 8. Auflage, Seite 84, Abbildung 3.8 | de |
UIBK - KursDB | Tables from and for the lecture Databases: Foundations, Data Models and System Concepts - University of Innsbruck chapter 3 | de |
UIBK - R, S, T | Tables from and for the lecture Databases: Foundations, Data Models and System Concepts - University of Innsbruck chapter 3 | de |
The Complete Book - Exercise 2.4.1 | Sample Data fromDatabase Systems The Complete Book 2nd Edition by Hector Garcia-Molina, Jeff Ullman, and Jennifer Widom: Exercise 2.4.1 Page 52-55 | en |
The Complete Book - Exercise 2.4.3 | Sample Data fromDatabase Systems The Complete Book 2nd Edition by Hector Garcia-Molina, Jeff Ullman, and Jennifer Widom: Exercise 2.4.1 Page 55-57 | en |
The tool is not meant to be a full database system. The goal of the implementation was to create a tool to support people to learn RelAlg.
Pen and Paper | relational algebra calculator | MySQL | |
---|---|---|---|
SQL support | yes :-) | basic SQL | yes |
relational algebra | yes | yes | no |
use variables for RelAlg | yes | yes | no |
large datasets | no | no | yes |
query plan | no | yes | no |
intermediate results | no | yes | no |
iterative working | no | yes | yes |
pi 'abc' like 'a%'->x R
||
-concat operatorexcept
as alternative syntax for the relational algebra set-difference operatorA=R join S A
was interpreted asA=(R join S A)
instead of A=(R join S) A
.pi hour(now())->x, minute(now())->y, second(now())->z ( R )
pi concat(b, '_', c)->x R
pi coalesce(a, b, 1)->x R
, select coalesce(a, b, 1) as x from R
select case when a > 3 then a+1 else a end as x from R
(select * from S union ( select * from T except select * from T )) order by 1
select distinct * from R, (S natural join T)
select * from R offset 2 rows fetch first 10 rows only
select distinct a+2 as x from R where length(b) > 2
1970-01-01
could not be used any more because it is ambiguous (arithmetic operaton or date). The SQL notation (date('1970-01-01')
) is now used for the relational algebra mode.The relational algebra calculator was created by Johannes Kessler BSc at Databases and Information Systems Group at the Institute of Computer Science at the University of Innsbruck under supervision of Michael Tschuggnall PhD and Prof. Dr. Günther Specht
This tool was not written from scratch but many different external resources/frameworks/projects/libs are used.
This is a list of resources/frameworks/projects/libs used for this tool (in alphabetical order) to give credit where credit is due and guide anyone interested to them without having to look through the code.