Added queries to database.js