Does anyone know any good online resources which I can use to practise SQL to relational algebra conversion?
Translating SQL Queries into Relational AlgebraA query is at first decomposed into smaller query blocks. These blocks are translated to equivalent relational algebra expressions. Optimization includes optimization of each block and then optimization of the query as a whole.
Relational algebra is a useful theoretical language that serves to define more complex languages. The second language we consider, Structured Query Language or SQL, is a practical language that allows a high-level expression of queries.
The SQL includes only some features from the relational algebra. SQL is based to a greater extent on the tuple relational calculus. 7. Relational Algebra is one of the languages in which queries can be expressed but the queries should also be expressed in relational calculus to be relationally complete.
Relational algebra cannot perform arithmetic operations. It is unable to do aggregation operations even it cannot compute transitive closure. It cannot modify the data present in the database.
See: http://db.grussell.org/index.html
The following powerpoint presentation may also be of help:
http://www.cs.wayne.edu/~shiyong/csc6710/slides/kiferComp_348761_ppt05.ppt
The online tool RelaX will allow you to convert SQL to Relational Algebra. You can also compose and execute relational algebraic expressions on small datasets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With