18. A computer readable storage medium comprising instructions which, when executed by one or more processors, cause the one of more processors to perform: receiving a logical description that references an abstract datatype in a database system, wherein the database system supports multiple database representations for the abstract datatype; receiving one or more sample queries that reference the abstract datatype; evaluating the one or more sample queries, wherein evaluating one or more sample queries comprises: determining a plurality of database representations that the database system supports for the abstract datatype; re-writing the one or more sample queries based on the plurality of database representations; performing a cost analysis of the re-written sample queries; based on the logical description and said evaluating said one or more sample queries, determining a database representation for the abstract datatype; wherein said database representation includes one or more base structures that are used to store data for the abstract datatype.
18. A computer readable storage medium comprising instructions which, when executed by one or more processors, cause the one of more processors to perform: receiving a logical description that references an abstract datatype in a database system, wherein the database system supports multiple database representations for the abstract datatype; receiving one or more sample queries that reference the abstract datatype; evaluating the one or more sample queries, wherein evaluating one or more sample queries comprises: determining a plurality of database representations that the database system supports for the abstract datatype; re-writing the one or more sample queries based on the plurality of database representations; performing a cost analysis of the re-written sample queries; based on the logical description and said evaluating said one or more sample queries, determining a database representation for the abstract datatype; wherein said database representation includes one or more base structures that are used to store data for the abstract datatype. 26. The computer readable storage medium of claim 18 , wherein determining the database representation for the abstract datatype is further based on a schema for the abstract datatype.