Translating SQL into the Relational Algebra