用关系代数代替 SQL
我这些天正在学习关系代数,我想知道......
你不认为如果存在一个可以编译关系代数的编译器比编译 SQL 会更好吗?
在什么情况下数据库程序员的工作效率会更高?
有没有关于关系代数编译器的研究?
提前致谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请参阅 CJ Date 的 教程 D,他还在某处对SQL。
另请参阅 datalog,虽然不完全是关系代数,但类似。
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.
在我的学校,一名学生将关系代数解析器作为学士论文实现。您可以在这里测试:
http://mufin.fi.muni.cz/projects/PA152/relalg /index.cgi
它是捷克语的,但我认为你可以明白一点。
我尝试编写一些关系代数查询,它比 SQL 中的等效查询要好得多!它们更短、写起来更简单、更直接、更容易理解。我真的很喜欢写它们。
所以我不明白为什么当有关系代数时我们都在使用 SQL。
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.
确实有关于编译关系代数的研究
一个很好的起点:
Thomas Neumann:为现代硬件高效编译高效查询计划。 PVLDB 4(9): 539-550 (2011)
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)