Managing keys

When you add a table to the Database panel, one or more keys may be suggested for that table. This is because the original designer of the database may have specified key fields in the database table. You can confirm keys that have been suggested or you can add your own. Keys will appear as key symbols in the table. Keys may be made up of one or more fields in a table. Two key symbols in the same column indicates that the key is made up of two fields.

You can have more than one key for a table. By default, only the first key is shown but you can see the other keys using the horizontal scroll bar or by making the table wider. You can also do this by right-clicking on the table and selecting Fit to Width.

Confirming suggested keys

To confirm a suggested key, right-click on the required key column (labeled 1, 2 and so on) and select Confirmed. The key symbol becomes yellow and reverses its direction. The Confirmed command toggles the confirmed status on and off.

Defining new keys

To define a new key:
  1. Right-click on the heading of the table for which you want to define a key and select New Key to display the Key Properties dialog.
  2. Move the fields you want to use as the key by selecting each required field in turn and clicking the right arrow button or double-clicking the required fields. When the correct fields appear in the Key fields box, click OK.

Deleting keys

To delete a key, right-click on the heading of the required key column (labeled 1, 2 and so on) and select Remove. The entire column is deleted.
Note: You cannot delete a database suggested key, you can only mark it as unconfirmed.