#### Tables and fields

The Catalog Doctor can be used to diagnose tables and fields in the following aspects:

- Finding all the mapping tables, views and DBFields in the catalog
  In the resource tree, go to the Tables and Fields node, and reveal it. All the mapping tables, views and DBFields in the catalog will then be listed. The icon in front of each object has a specific meaning, which indicates whether the object is valid or not.

  The following are descriptions of the icons in front of each object:

  : Table

  : Table which does not exist in the database

  : Table which has invalid fields

  : View

  : View which does not exist in the database

  : View which has invalid fields

  : Field

  : Field which does not exist

  : Field with a name which can be found in the database, but has a type mismatch.

- Finding the stored information of a mapping table/view or a DBField
  Select a table/view or a DBField on the resource tree to find its stored properties. The information will be listed in the Properties panel.
- Finding all the raw tables/views
  Select a table/view in the Tables and Fields node. All the raw tables/views will be shown in the Choose from following to Re-Map panel. Each item there shows the name of a table/view.
- Getting the raw columns in a raw table/view
  First select a mapping table/view, then choose a raw table/view from the Choose from following to Re-Map panel. The raw columns will be shown in the bottom right panel.

  Note: If you select a mapping table/view with an existing raw table/view, the raw table/view will automatically be selected.

- Deleting a set of mapping tables, views or DBFields
  To delete the mapping object, you can use one of the following methods:
  - Select an object from the resources tree, right-click and on the shortcut menu click Delete.
  - Click the Delete button on the toolbar after selecting the object.
  - Select the object and press Delete on your keyboard.

  To delete a set of mapping tables, views or DBFields, select the objects you want to delete, and click on the toolbar (or press Delete on your keyboard).

- Re-mapping (Updating) a mapping table/view
  First select the mapping table/view that is to be updated from the resource tree. Then, select the raw table/view which the mapping table/view refers to from the Choose from following to Re-Map panel, and click the Update button on the toolbar.

  Note: The tree is sorted by the validation status of each object (invalid objects are listed ahead). So, after you have updated a mapping table/view, the order of the objects will probably change. If the table was invalid and becomes valid after updating, it will be listed after the invalid objects.

- Re-mapping (Updating) a DBField
  Before updating a DBField, you must make sure that the mapping table/view of the DBField is valid. That is, the raw table/view that the mapping table/view refers to exists in the database.

  Select the DBField you want to update from the resource tree, choose the raw column you want the DBField to refer to in the bottom right panel, and then click the Update button on the toolbar.

- Adding tables/views
  Click the Add Table button or the Add View button on the toolbar, or on the resource tree select a table, right-click and select Add Tables from the shortcut menu. In the Add Table/View dialog, select the tables/views you would like to add, and click Add. To finish adding, click Done.
- Adding a DBField
  Select a table or a column from the resource tree, right-click and on the shortcut menu click Insert Column to bring out the Add Column dialog. Then select the column you want and click Add. When you have finished adding columns, click Done to close the dialog.