Chapter 3 DBMS Reference Guide


ODBC reverse engineering

The DBMS contains ODBC reverse engineering queries for retrieving objects (like Table, Columns, and so on) from the database.

Most queries follow the same naming pattern "Sql...Query".

Entry Description
SqlListQuery Lists objects for selection in the Selection box. SqlListQuery retrieves objects and fills the reverse engineering window. Then, each of the other queries below are executed for each selected object.
If SqlListQuery is not defined, standard ODBC functions is used to retrieve objects. SqlAttrQuery, SqlOptsQuery etc. will then be executed, if defined.
SqlListQuery must retrieve the smallest number of columns possible as the process is memory intensive
SqlAttrQuery Reverse engineers object attributes
SqlAttrQuery may be unnecessary if SqlListQuery can retrieve all necessary information. For example, in Sybase Adaptive Server Anywhere 6, a tablespace list query is sufficient to retrieve all information required for use in a PDM
SqlOptsQuery Reverse engineers physical options
SqlListChildrenQuery Reverse engineers lists child objects, such as columns of a specific index or key, joins of a specific reference
SqlSysIndexQuery Reverse engineers system indexes created by the database
SqlChckQuery Reverse engineers object check constraints
SqlPermQuery Reverse engineers object permissions

You can define additional ODBC queries to recover more attributes during reverse engineering. This is to avoid loading SqlListQuery with queries for retrieving attributes not supported by SqlAttrQuery, or objects not selected for reverse engineering. These additional queries must be listed in the ReversedQueries entry. For example, SqlColnListQuery is used to exclusively retrieve view columns. This query has to be declared in the ReversedQueries entry in order to be taken into account during reverse engineering.

Note: extended queries should not be defined in the ReversedQueries entry. For more information on ReversedQueries, see section "Extension mechanism for ODBC reverse engineering queries".


 


Copyright (C) 2005. Sybase Inc. All rights reserved.