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