将SQL查询转换为关系代数 [英] Convert SQL query to relational algebra

查看:666
本文介绍了将SQL查询转换为关系代数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SQL查询中输入,对其进行词法分析,解析并生成关系代数表达式。请尽快回答。

解决方案

为了达到这个级别的问题我会假设你可以通过一些调查自己回答。



真的,你在追求什么,一种从查询或其他东西建立DDL的方法?



更多信息,请闻到可疑的气味就像一个家庭作业问题一样。


虽然我不打算为你做功课(对不起)我可以给你指一篇维基百科文章,它将总结RA并指出一些有用的参考资料。



研究这个以及它带给你的地方,如果您有具体问题,请随时提出。



http://en.wikipedia.org/wiki/Relational_algebra



干杯。


SELECT Suppliers.sid FROM供应商,零件,目录WHERE Suppliers.sid = Catalog.sid和Catalog.pid = Parts.pid AND(Parts.color ='red'或Parts.color ='green' )和Catalog.cost< 100

Take an input in SQL query, lexically analyze it, parse it and produce a relational algebric expression. Please answer as soon as possible.

解决方案

To get to that level of question I would have assumed you could probably answer it yourself with some investigation.

Really, what are you after, a way to build DDL from queries or something ?

More info please, smells suspiciously like a homework question.


Whilst I'm not about to do your homework for you (sorry) I can point you to a Wikipedia article that will summarise RA and point you to some useful references.

Study this, and where it leads you, and if you have specific questions please feel free to ask.

http://en.wikipedia.org/wiki/Relational_algebra

Cheers.


SELECT Suppliers.sid FROM Suppliers, Parts, Catalog WHERE Suppliers.sid = Catalog.sid AND Catalog.pid = Parts.pid AND (Parts.color = 'red' OR Parts.color = 'green') AND Catalog.cost < 100


这篇关于将SQL查询转换为关系代数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆