A method of executing a query on an object in a system in which the object is an instance of a user defined type that is persisted in a database store, wherein a definition of the user defined type comprises one or more fields and behaviors, wherein at least one of the behaviors returns a value of one of the fields of the user defined type, wherein each field of the user defined type is annotated with a first attribute that controls one or more storage facets of the field, wherein the first attribute in combination with an actual type of the field is used to control a storage layout of the value of the field, wherein the storage facets of the field comprise at least one of the maximum size of the field, whether or not the field is fixed length, the precision of the field, the scale of the field, and whether values of the field can be null, wherein each of the at least one of the behaviors returning a value of one of the fields of the user defined type is annotated with a second attribute that denotes an equivalent structural access path, wherein the second attribute specifies a name of the field that is the subject of the behavior, wherein the name is used as the equivalent structural access path for the behavior, wherein the object type is defined as a class in managed code, managed code being code running within a Common Language Runtime, CLR, environment, and wherein the database store maintains information reflecting the storage layout as provided by the annotations to the type definition, the method comprising: receiving, by a database server, a query that includes a predicate or an expression that references a behavior of the at least one of the behaviors returning a value of one of the fields of an object that is an instance of the user defined type; accessing, by the database server, the information maintained by the database store to determine the storage layout of instances of the user defined type; translating, by the database server, the query into the equivalent structural access path for a value of the field of the user defined type that is the subject of the referenced behavior; structurally accessing, by the database server, the value in a table of the database store by parsing the object that is persisted in the database store without populating all parts of the object in the CLR environment and without invoking the referenced behavior of the object in the managed code; and returning, by the database server, the value in response to the query. receiving, by a database server, a query that includes a predicate or an expression that references a behavior of the at least one of the behaviors returning a value of one of the fields of an object that is an instance of the user defined type; accessing, by the database server, the information maintained by the database store to determine the storage layout of instances of the user defined type; translating, by the database server, the query into the equivalent structural access path for a value of the field of the user defined type that is the subject of the referenced behavior; structurally accessing, by the database server, the value in a table of the database store by parsing the object that is persisted in the database store without populating all parts of the object in the CLR environment and without invoking the referenced behavior of the object in the managed code; and returning, by the database server, the value in response to the query.