10. A database system comprising: a storage module to store data; at least one processor; and a parser executable on the at least one processor to: process a query for accessing the data, wherein the query contains at least one user-defined data type routine, transform the query into a statement, and remove redundant invocations of the at least one user-defined data type routine in transforming the query to the statement.
27. The database system of claim 10 , wherein the parser is to further receive a Structured Query Language CREATE TYPE statement to create a user-defined data type (UDT), wherein the at least one user-defined data type routine is associated with the UDT.