PyRAL

PyRAL is a pythonic interface designed by Leon Starr to a relational algebra library written in Tcl/C called TclRAL, designed by Andrew Mangogna (co-author of the book Models to Code).

Rather than using SQL, you can use pure relational expressions as defined by C.J. Date and Hugh Darwen.

Rather than having to write awkward SQL expressions, the relational algebra library lets you nest expressions so that you get a lot more done with less.

Here’s a great reference on the math.