Table and query type tree structure
Type trees generated for a query and a table closely resemble one another.
Each type tree generated by the Database Interface Designer or mtsmaker for a database table or query (or a query that calls a stored procedure) will have the following standard characteristics:
- The root of the generated type tree is named Data.
- The generated type tree contains a category whose name corresponds to
any one of the following:
- the name of the table in the database
- the name of the query in the MDQ file
- the name specified using the Category Type (-N) parameter for mtsmaker
The types defining the columns and rows returned by the database adapter stem from this type. In the examples, the categories are ActiveProjects and stores.
- Stemming from the category named for the table or query are types that define the contents of the table or the results of query execution.
- Each column in the database table or in the results of the query must have a corresponding item type with a name identical to that of the column in the database. These types stem from an item type (shown in each example) named Column.
- A group type named Row represents a single row of data-either the result of a SELECT statement or a row to be inserted/updated in a table or view.
- An implied group represents a collection of rows reflecting the results of a query, table, or view. This group is named either DBSelect for a query or DBTable for a table or view (or DBProcedure for a stored procedure.