Relational Algebra instead of SQL
Asked Answered
S

3

10

I am studying relational algebra these days and I was wondering...

Don't you thing it would be better if a compiler was existed which could compile relational algebra than compiling SQL?

In which case a database programmer would be more productive?

Is there any research on relational algebra compilers?

Thanks in advance

Spelling answered 8/8, 2010 at 13:7 Comment(0)
Z
5

See Tutorial D by C J Date, he also has a good rant somewhere on the evils of SQL.

Also see datalog, although not exactly relational algebra, is similar.

Zerk answered 8/8, 2010 at 13:7 Comment(3)
I'm not at all sure what is going on. There appears to be a //tp being inserted. Look up Tutorial D on wikipedia. There is also an implementation of Tutorial D called rel. C J Date's rant is entitled "A critique of the SQL database language", but it is behind a paywall. If you are a student you should be able to get it.Zerk
I am not a student, I was refreshing relational algebra, I have written maany lines of SQL but reconsidered relational algebra as better than SQL.Spelling
Datalog is exactly relational algebra plus transitive closure.Heliacal
A
3

On my school one student implemented relational algebra parser as a Bachelor thesis. You can test it here:
http://mufin.fi.muni.cz/projects/PA152/relalg/index.cgi

It's in czech language but I think you can get a point.

I tried to write some Relational Algebra queries and it was much better than equivalent queries in SQL! They were much shorter, simplier to write, more straightforward, more understandable. I really enjoyed to write them.

So I don't understand why we all are using SQL when there is Relational Algebra.

Avrilavrit answered 8/8, 2010 at 13:7 Comment(0)
D
1

There is indeed research on compiling relational algebra

A good place to start: Thomas Neumann: Efficiently Compiling Efficient Query Plans for Modern Hardware. PVLDB 4(9): 539-550 (2011)

Desiccant answered 8/8, 2010 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.