Missing logical keys
Dataedo imports foreign keys and displays them in Relations tab. Sometimes, a logically existing relation is not physically coded in database. Similar logical constraints may also exist on views. Dataedo allows you to add them both to your tables and views by using user-defined keys.
Adding user-defined relations
Note: User-defined relations exist only in Dataedo repository and are not populated back to database schema.
To add user-defined relation (foreign key) for your table/view go to Relations tab and click Add relation button on the ribbon or from context menu under right click.
This will open a key form:
- Name - the name of the key. It is optional, a default name will be set after saving,
- FK Table - foreign table, this field is disabled as you are defining a foreign key for current table/view. If you need your table to be primary, add relation from the other tables form,
- PK Table - choose primary table/view from drop down with all the tables and views from your documentation,
- Columns - you must choose from a dropdown one or more pair of columns that will be part of your foreign key,
- Description - you may provide description of your relation. This is the same field as in the table of relations.
Once you provided all the fields click OK to add a relation. New relation will be added to the table of relations. Note that user-defined relations have icons with a blue man ().
Editing user-defined relations
To edit key select key in the table and click Edit relation button on the ribbon or from context menu under right click.
The same form will open, and you will be able to provide changes.
ER Diagrams
Regular or user-defined relations are used to draw Entity Relationship Diagrams.