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 having to write awkward SQL expressions, the relational algebra library lets you nest expressions so that you get a lot more done with less.