Energy Modeling and Plan Evaluation for Queries in Relational Databases