Product Documentation

ODBC - c-tree Plus Edition

Previous Topic

Next Topic

FairCom Data Dictionary - In Depth

This section contains additional information about the FairCom Data Dictionary. The browse and script methods for creating the FairCom Data Dictionary are found in “Building a FairCom Data Dictionary Script.” Instructions include defining multiple databases, adding files to the dictionary, and general ODBC notes.

Previous Topic

Next Topic

Defining Multiple Databases

One important concept is that each database defined by the Script Name setting in the c-tree ODBC Setup dialog can be thought of as a view into a larger database. The FairCom Data Dictionary (CTSYSCAT.FCS) can hold many database names (or views), each containing many file (table) names. The fewer files in each database, the faster data access will be. It is advisable to split your application files across many databases, each containing different groups of files.

For example, the tutorial has four files: Customer, Orders, Order_Detail, and Items. If a particular user only requires access to information from the Customer file, create a database with only the Customer file. This is done with the automatic dictionary method by creating a dictionary script with just the customer file, CUSTOMER.DB, as follows:

CUSTOMERS c:\FAIRCOM\ODBC\32bit\sample\custmast.dat

Using the ODBC Setup icon in the Windows Control Panel, a new ODBC Driver entry can be created that specifies the Script Name to be CUSTOMER.DB.

Previous Topic

Next Topic

Adding Files to the Dictionary

To add additional files to the FairCom Data Dictionary, create a new dictionary script listing all files to include in that database. The new files will be appended to the database name that corresponds to the script name. This also allows you to remove files from a database. The re-creation of the dictionary takes place the next time the c-tree ODBC Driver is accessed.

For example, to add a new file ORDERS to CUSTOMER.DB, a script would be created as follows:

CUSTOMERS c:\FAIRCOM\ODBC\32bit\sample\custmast.dat

ORDERS c:\FAIRCOM\ODBC\32bit\sample\order.dat

For this example, ensure the Script Name is set to CUSTOMER.DB and the location specified by the Data Dictionary Path is the location of CUSTOMER.DB. The next time an ODBC application accesses the c-tree ODBC Driver that references CUSTOMER.DB as the Script Name, the ORDERS file will be appended to the dictionary. After the file is appended to the dictionary, the script (CUSTOMER.DB) is no longer needed.

TOCIndex