1. A method in a data processing system for managing domains in a database management system, comprising: responsive to receiving a request for data from an application, identifying one or more domains in the request; determining if operators for each domain pair identified in the request are authorized; determining if functions in the request are authorized; and responsive to determinations that the operators and functions are authorized, rewriting the request to include a casting formula for each domain pair operation to form a rewritten request.