Defining Table Structure

A table contains columns and indexes. In addition, a table has options such as table type, row format and so on. Defining a table structure means setting up all these elements.

To define table structure, create a table or open existing one from Database Explorer. There are five tabs in Table editor: Main, Constraints, Indexes, Storage, and Data.

Defining Columns

Switch to the Main tab of Table editor to define columns or rename the table.

To add a column to the table, right-click the grid and select New Column on the shortcut menu. Alternatively, press the INSERT key.

To edit an existing column, right-click it and select Edit Column on the shortcut menu or double-click a column row.

To remove a column, right-click it and select Delete Column on the shortcut menu.

You can add a new column or edit an existing one directly in the editor. The editor gives you access to the main column properties. To edit any of the available properties, open the Column Properties dialog box by clicking the corresponding button in the grid. When entering standard column names (like ID, Name, etc) or names, containing such words, column type will be suggested automatically. To read explanation on all properties listed in the dialog see Column Properties Dialog Box.

Defining Constraints

Switch to the Constraints tab of Table editor to add or alter foreign and primary keys.

To add a key to table, right-click the tab and select New Foreign Key or New Primary Key on the shortcut menu, then select a type of key you want to create.

To edit an existing key, right-click it and select Edit Constraint on the shortcut menu. You can also double-click a key row to accomplish this task.

To remove a key, right-click it and select Delete Constraint on the shortcut menu.

Defining Indexes

Switch to the Indexes tab of Table editor to define indexes. Generally, it is similar to defining columns.

To add an index to table, right-click the tab and select New Index on the shortcut menu. Another way to do this is to press the INSERT key.

To edit an existing index, right-click it and select Edit Index on the shortcut menu. You can also double-click an index row to accomplish this task.

To remove an index, right-click it and select Delete Index on the shortcut menu.

When you add a new index or edit existing one, the Index Properties dialog box appears. To learn more about properties listed in the dialog, see the Index Properties Dialog Box topic.

Defining Table Options

Tune up specific options according to your plans for the table in the Options tab of Table editor.