1. A method for exchanging at least one instance of a non-native data type between a database and a client, wherein the client requests data by calling an application programming interface (API), comprising: requesting by the client the at least one instance of a non-native data type, wherein said non-native data type conforms to a type system shared by said database and said client; receiving by the API metadata that references the non-native data type in a client type library; receiving by the API a serialized instance of the non-native data type; deserializing by the API the serialized instance of the non-native data type using said metadata.