Some terms and concepts that you need to understand before connecting to a database include: "database manager," "connection specification," "alias," and "access set."
Database managers
The interface between VisualAge and a DBMS is called a database manager. To use VisualAge's database support, you connect to a database through a VisualAge database manager. VisualAge uses the following database managers:
Connections, connection specifications, aliases, and logon specifications
A database connection is a connection from VisualAge to a database through a database manager. You can establish more than one database connection at a time if your DBMS allows multiple connections.
To keep track of your database connections, VisualAge uses something called connection specifications. A connection specification associates an alias, which is a name that you make up to refer to your database, with a VisualAge database manager and a database name or ODBC data source. You might use the alias SampleConSpec, for example, to refer to a connection to the SAMPLE database through DB2/2. A connection specification serves several purposes:
You can define a connection specification once and use it over and over again in more than one application. If you change the database that an alias points to, then you can automatically update all parts that use that alias.
When you connect to a database, you can pass the connection specification a logon specification, which consists of a user ID and a password. If you connect to a database with a logon specification, then VisualAge handles the database logon automatically. Otherwise, it prompts you with a database logon window, which you can use to enter your user ID and password.
Access sets
An access set is a special part that you define and package with your application to store connection specifications, database query definitions, and stored procedure definitions. An access set tells your application which connection specifications, queries, and stored procedures it can use.
Access sets are used in VisualAge only. The VisualAge User's Guide explains how to create an access set.
Before you can start working on a database application, you need to establish a database connection as follows. Each of these tasks are explained in the following sections: