A database system carries out a technique for use in delivering data of a user-defined type to a requesting system. The system first receives a request from the requesting system for data of the user-defined type. The system then identifies a storage location for the requested data, as well as a storage location for program code designed to allow manipulation of the requested data on the requesting system. The system then retrieves both the requested data and the program code from their respective storage locations and delivers both the requested data and the program code to the requesting system.
The subject invention relates to systems and methods that perform consistency checks of user defined type (UDT) fragments utilizing a stream of data without wholesale copying of the data. Streaming consistency checks facilitate discovering invalid fragments as soon as possible such that the entire UDT fragment does not have to be read, stored, analyzed, etc. Additionally, a UDT fragment can be evaluated without being completely materialized; thus, systems and/or methods employing the subject invention can yield improved performance as compared to conventional techniques by reducing required resources and enabling faster detection of invalid structures.