Added database query for reading from DB.