1. A method comprising: 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; and based on the logical description and the one or more sample queries, determining a database representation for the abstract datatype.