Creating Attributes and Keys
You can create new attributes and alternative keys in an ER diagram using an entity's context menu. The primary key is automatically created as soon as an attribute is shown as primary.
Creating a New Attribute
How to proceed
-
To create a new attribute in the top position, select the
attribute template from the mini toolbar in the context menu of an entity.
A new attribute is created in the entity at the topmost position. The name of the attribute is automatically selected to be edited.
-
To create a new attribute after the selected attribute, choose the
attribute template from the mini toolbar in the context menu of an attribute.
A new attribute is created in the entity behind the selected attribute. The name of the attribute is automatically selected to be edited.
-
Enter the name for the attribute and confirm with the [Enter] key.
-
You can create more attributes using [Ctrl]+[+].
Creating the Primary Key Using an Attribute's Properties
How to proceed
-
Select the
primary property from the mini toolbar of an attribute's context menu.
If the entity does not already contain a primary key, this is created. The attribute becomes part of the primary key. The foreign key is adapted accordingly in dependent entities.
Creating an Alternative Key
How to proceed
-
In the context menu of an entity, choose the
key template from the mini toolbar.
A new key is created in the entity. The name of the key is automatically selected to be edited.
-
Enter a name for the key and confirm with the [Enter] key.
-
Drag this entity's attributes and drop them on the new key.
The attributes are assigned to the key.
Assigning an Attribute to Multiple Foreign Keys
Context
When making a relationship, the foreign key attributes are automatically created to match the referencing key.
If an entity contains two foreign keys each having one attribute that must be of equal value, merging these two attributes gives one attribute that is a participant in two foreign keys.
How to proceed
-
Select the attribute of equal value.
At least two attributes in an entity are selected.
-
Select the command Foreign Key Attribute>Merge from the context menu.
An attribute selection dialog opens.
-
Select the attribute that should be retained together with its properties.
The attributes are merged so that only the selected attribute is retained. Ingoing and outgoing dependencies are taken from the other attributes. The assignments to foreign keys are adapted. These attributes are then deleted.