When you select the New Entity Type or New Link
Type command to define a new type, the Type Structure dialog appears. The
Structure page of this dialog initially contains any tables that were selected on the
Database page when you selected the New Entity Type or New
Link Type command.
On many occasions, you will only need one table for the type. In this case, all you
have to do in this dialog is enter the name of the type and select the default icon
(for an entity type) or select the color and turn on the Reflexive check box if
required (for a link type).
If the type you are defining requires information from more than one database table,
you must define the type structure:
-
All of the tables from which information is required must appear in the Type
Structure dialog. If you did not select all the required tables, you can add
others in this dialog by dragging them from the tree view or right-clicking on
them in the tree view and selecting Add.
When deciding which tables you need to include in the structure of a link
type, you should also consider whether you may need to add conditions later
when defining the link ends. If the end of a link type can refer to multiple
entity types, you will have to define conditions that distinguish the entity
types. The data upon which these conditions are based must be available in
the link type. For more information, refer to Defining link end conditions.
-
You must confirm or create the relationships that exist between the tables in
the type. If any relationships existed between the tables in the Database Page,
these will be reflected in the Type Structure dialog with the same confirmed or
unconfirmed status. You can create new relationships in this dialog if required
or remove or confirm any that were reflected from the Database Page.
If the content of a field in one table is the same as the content of a
field in another table, iBridge Designer allows you to define field
equivalences. Defining a field equivalence will prevent the data appearing
twice in the resulting type. Defining a field equivalence in preference to
defining a relationship means that iBridge Designer does not need to perform
a join on these fields. It is then used to help optimize queries.
To
define a field equivalence, hold the Alt key down as you drag between the
equivalent fields. Field equivalences are shown in blue.
-
If the type is only applicable to a subset of records in your database
table(s), you must define the conditions which define this subset. For example
in the Accounts Example 3 database, if you want to define three accounts types
all originating in the Account table, you will need to set the conditions to
distinguish each type. Defining filters on a type .