Ask a Question

difference between relational algebra and relational calculus.


Sunidhi

on 2012-01-24 10:30:00  

Relational algebra and relational calculus are logically equivalent; in some respects, therefore, the choice between them comes down to nothing more than a matter of personal taste or style. It might be claimed, very loosely, that programmers prefer the algebra while end-users prefer the calculus. Some aspects of reasoning do seem to be more readily framed in terms of the calculus. Codd himself, in his "relational completeness" paper, gave his own arguments for regarding the calculus as superior (or at least more user-friendly), and he even claimed elsewhere that the calculus was at a higher level of abstraction than the algebra. In the book mentioned above, however, I give my own reasons for thinking his arguments don't really stand up, even though I do tend to prefer the calculus myself. I'll say one more thing: The algebra, consisting as it does of explicit operators, is more clearly implementable than the calculus (albeit not necessarily efficiently so!); the calculus looks a little more like natural language, and its implementability is thus not so immediately obvious. In fact, by showing that any expression of the calculus could be mapped into a semantically equivalent expression of the algebra, Codd provided a basis for implementing the calculus.