Teaching Relational Algebra and Relational Calculus : A Programming Approach

This paper describes how relational algebra and relational calculus can be taught using a programming approach. This is in contrast to the mathematical presentation of these topics in most database textbooks. For relational algebra, a function library implemented with Visual FoxPro allows queries to be written as a sequence of function calls--one call per relational algebra operation. For relational calculus, Prolog can be used to write non-procedural programs for queries. In each programming environment, database students experience the power and versatility of these query languages by watching their programs run. In doing so, they gain a greater understanding of the relational model and SQL.