Creating Table Columns, Keys and Indexes
You can create new table columns, alternative keys and indexes in a DB diagram using the context menu in a selected table. The primary key is automatically created when a new database table is created.
Creating a New Table Column
How to proceed
-
To create a new table column at the uppermost position, from the context menu of a table select the column template from the mini toolbar.
A new column is created in the table at the topmost position. The name of the column is automatically selected to be edited.
-
To create a new table column after the selected column, from the context menu of the selected table column select the column template from the mini toolbar.
A new column is created in the table after the selected column. The name of the column is automatically selected to be edited.
-
Enter the name for the column and confirm with the [Enter] key.
-
You can create more columns using [Ctrl]+[+].
Extending the Primary Key Using a Column's Properties
How to proceed
-
Select the primary property from the mini toolbar of a column's context menu.
The column becomes part of the primary key. The foreign key is adapted accordingly in dependent tables.
Creating an Alternative Key
How to proceed
-
Select the template for the alternative key from the mini toolbar of a table's context menu.
A new key is created in the table. The name of the key is automatically selected to be edited.
-
Enter the name for the key and confirm with the [Enter] key.
-
Drag this table's columns and drop them on the new key.
The columns are assigned to the key.
Creating an Index
How to proceed
-
Select the index template from the mini toolbar of a table's context menu.
A new index will then be created in the table. The name of the index is automatically selected to be edited.
-
Enter the name for the index and confirm with the [Enter] key.
-
Drag this table's columns and drop them on the new index.
The columns are assigned to the index.
Assigning Multiple Foreign Keys to a Table Column
Context
When generating a foreign key, the foreign key columns are automatically created to match the referencing key.
If a table contains two foreign keys each having one column that must be of equal value, merging these two columns gives one column that is a participant in two foreign keys.
How to proceed
-
Select the table column of equal value.
At least two table columns in a table are selected.
-
Select Merge>Columns in the context menu.
A column selection dialog opens.
-
Select the column that should be retained together with its properties.
The columns are merged so that only the selected column is retained. Ingoing and outgoing dependencies are taken from the other columns. The assignments to foreign keys and indexes are adapted. These columns are then deleted.