The DBMS can access only one logical database at a time, but this database can be divided into one or more companies. A company is a "subdatabase," and its primary use is to separate and group data in the same database. Fields and tables are identified by a number, but companies are identified by a name. A company bundles one or more data tables together into a logical superstructure that is identified by the company name. Other than the shared company name, the different tables within a company have nothing in common.

Opening a company is your first step after opening the database or connecting to a server.

The following illustration shows a database with four tables.

The four table descriptions on the left apply to each of the data tables, which are logically sorted into three companies. The records in the tables, G/L Account, Customer, and Vendor have the same structure and the same field definitions, even though they belong logically in three different companies. Only the data stored in the fields differ. The information in a Table Description can be used by tables from more than one company, no redundant information will be stored. This minimizes the size of the database.

Even though you have selected a specific company, you can still access data in any table in any other company. Use the CHANGECOMPANY Function (Record) to explicitly define which other company you want to access.

More than one application can access the same company and the same tables at the same time. For more information about how the DBMS controls these multiple accesses, see Table Locking.

See Also