Interpreting and Translating SQL to Relational Algebra