Applications use catalog data in a variety of ways. Here are some common uses:
Generic applications, such as a spreadsheet program that uses ODBC to retrieve data, often construct SQL statements at run time based on input from the user. Such an application could require the user to type the names of the tables and columns to use. However, it would be easier for the user if the application displayed lists of tables and columns from which the user could make selections. To build these lists, the application would call the SQLTables and SQLColumns catalog functions.
Such environments could also use SQLTables and SQLColumns to create lists from which the programmer could make selections. They might also use SQLPrimaryKeys and SQLForeignKeys to automatically determine and show relationships between selected tables, and use SQLStatistics to determine and highlight indexed fields so the programmer can create efficient queries.