摘要:
A method and apparatus for determining a database representation for an abstract datatype that may have more than one database representation. A user supplies a logical description that references the abstract datatype, along with one or more sample queries that reference the abstract datatype. For example, the user supplies a DDL statement to create a table using that abstract datatype as a column, without specifying any database representation for the abstract datatype. Also the user supplies a set of queries that reference the abstract datatype columns. Based on the user information, a database representation for the abstract datatype is determined. A script file containing code to create one or more base structures for the abstract datatype and to create zero or more indexes for the base structures is generated. The script file may be commented to explain to the user why a particular base structure or index was included in the script file.