Data base query parser