dotConnect for Salesforce Documentation
Information Schema

When you connect to or the first time, dotConnect for Salesforce needs to retrieve metadata and map objects to the relational tables. This process is complex and can take some time, so to avoid retrieving the metadata each time when connecting, dotConnect for Salesforce caches the metadata and stores it in an SQLite database.

Objects are mapped to tables; their fields, including ID, system, and calculated fields, are mapped to the table columns. ID field is mapped as the table primary key. Master-Detail relationships between objects are mapped to foreign keys between tables. Note that two Relationship fields - on the master side and on the detail side - correspond to one foreign key.

The schema of the metadata database has tables, compliant with the SQL-92 information schema standard. The location of this metadata database can be specified in the Metadata Cache connection string parameter. If it is not specified, the metadata is stored in the user Application Data folder by default. The metadata database is shared between different connections to the same or account. You may even transfer it from the developer computer to the end-users' ones in order to save the time for querying metadata.

If the metadata is not found when connecting, the metadata is queried again, objects are remapped to the tables and a new metadata database is created. You can refresh metadata using the RefreshMetadata method of the SalesforceConnection.Cache object. The metadata database contains the following tables:

You may query these tables in the same way you query the or tables (objects) to retrieve the metadata. However, you should not use both metadata tables and or objects in one query. If you query both in a single SELECT statement, you will get an exception.

Here are examples of such queries:

See Also

Metadata | Metadata Overview | Using GetSchema Method