CSCI 343 Relational operator notes

Relational algebra is one of the most abstract areas of computer science. It is a theory based on mathematical logic, formal algebra, and set theory. It also forms the foundations for SQL, Structured Query Language.

A course like MATH 280, Foundations of Mathematics, would be very useful for understanding formal aspects of the relational algebra.

What is a relation?

A relation consists a attribute set and a collection of tuples drawn from values. Values may be integers, strings, etc. The tuple is a collection of values. Formally, the tuple is a function from attributes to values.

The relation corresponds to the table of database theory while the tuple is similar to the row or record and the attribute is similar to the column or field.

Notation for Relational Algebra


You can read about relational algebra from the Wikipedia page or the Chapter 2: “The Relational Model of Data” of Database Systems: The Complete Book by Hector Garcia-Molina, Jeffrey D. Ullman and Jennifer Widom.

The relation model was first described in E. F. Codd’s paper “A relational model of data for large storage objects” which was published by Communications of the ACM in July 1970. (Available from UNC Asheville library.)


Jun Yang has write RA: A Relational Algebra Interpreter. The program interfaces with sqlite3 to provide a relational algebra programming experience.