Added database queries for mobile app.