Defining a database

About this task

When an MDQ file appears in the Navigator, you can add new database definitions to it or you can modify the name of an existing database. This is done using the Database Definition window. Each Database Definition window contains some settings that are common across all platforms and others that are platform-specific. To view more information about each platform-specific setting, refer to either the context-sensitive help available from the dialog itself or to each platform-specific reference guide.

For the purposes of outlining a basic procedure to define a database, the ODBC adapter for the Windows platform will be used. An example follows.

see the following table for a listing of the settings in this window and their descriptions.

Setting
Description
Database Name
This is the name of the database being defined. This name appears in the Navigator.
Adapter
Adapter properties:
Type
This is a list of adapters that can host the database you are defining. Select one from the list. The default value is ODBC.

This selection will affect the list of supported platforms displayed in the Platform list.

Platform
This is a list of platforms upon which the adapter (that you selected in the Type list) is supported.
Access user tables/procedures only
This setting determines level of user access and, to some extent, the presentation of the information being presented. The default value is Yes.

If No is selected, all of the names (of tables, views, and so on) in the database are accessible and are presented, including the respective prefix of each associated user ID.

If Yes is selected, only the names (of tables, views, and so on) in the databases associated with the current user ID are accessed and presented. Because these are all associated with the same user, no prefix is added.

Surround table/column names with
This setting indicates the character you want to use to enclose table and column names. For example, many databases require that names be enclosed by single or double quotation marks if they have spaces in their names, or when the names are SQL reserved words. When you specify table names in output cards or column names in update keys, these names will be enclosed by the character defined in this setting to provide database compatibility. There is no default value.
Data Source
Data source properties:
Database Interface Designer
Both this and the Runtime settings are platform-specific settings. On other platforms, you may have different settings. Again, see the platform-specific adapter reference guide or the context-sensitive help for more setting-specific information.

This is the name of the data source used to access database information for design-time (pre-production or testing) purposes.

Runtime
This is the name of the data source used to access database information for run-time (map execution) purposes.
Security
Security properties:
User ID
This is the user ID used to access the database. If you do not know this information, contact your database administrator. There is no default value.
Password
This is the password used to access the database. If you do not know this information, contact your database administrator. There is no default value.

To define a database:

Procedure

  1. From the Navigator, select Databases under the MDQ file.
  2. From the Database menu, select New.

    or

    Right-click the Databases object in the Navigator and select New.
    The Database Definition window appears.
  3. Enter information for the remaining settings as desired.
  4. Click OK.
    The new database name appears in the Navigator next to the database icon.