An application is a program that calls the ODBC API to access data. Although many types of applications are possible, most of them fall into three categories, which are used as examples throughout this book.
Generic Applications. These are also referred to as shrink-wrapped applications or off-the-shelf applications. Generic applications are designed to work with a variety of different DBMS. Examples include a spreadsheet or statistics package that uses ODBC to import data for further analysis and a word processor that uses ODBC to get a mailing list from a database.
An important subcategory of generic applications are application development environments, such as Microsoft Visual Basic and f90SQL under Fortran. Although the applications constructed with these environments will probably work only with a single DBMS, the environment itself needs to work with multiple DBMS.
What all generic applications have in common is that they are highly interoperable among DBMS and they need to use ODBC in a relatively generic manner.
Vertical Applications. Vertical applications perform a single type of task, such as order entry or tracking manufacturing data. They work with a database schema that is controlled by the developer of the application. For a particular customer, the application works with a single DBMS. For example, a small business might use the application with dBase, while a large business might use it with Oracle.
The application uses ODBC in such a manner that the application is not tied to any one DBMS, although it might be tied to a limited number of DBMSs that provide similar functionality. Thus, the application developer can sell the application independently from the DBMS. Vertical applications are interoperable when they are developed but are sometimes modified to include non-interoperable code once the customer has chosen a DBMS.
Custom Applications. Custom applications are used to perform a specific task in a single company. For example, an application in a large company might gather sales data from several divisions (each of which uses a different DBMS) and create a single report. ODBC is used because it is a common interface and saves programmers from having to learn multiple interfaces. Such applications are generally not interoperable and are written to specific DBMSs and drivers.
A number of tasks are common to all applications, no matter how they use ODBC. Taken together, they largely define the flow of any ODBC application. The tasks are:
Because the majority of data access work is done with SQL, the primary task for which applications use ODBC is to submit SQL statements and retrieve the results (if any) generated by those statements. Other tasks for which applications use ODBC include determining and adjusting to driver capabilities and browsing the database catalog.