1:n/n:1 Relationships

These sublists are used to create and manage link relationships to and from the data class. More information: -> Relationships between data classes.

Link Name name of a link between two data classes
Table 1 name of Table 1
Key 1 name of the Key for Table 1
Table 2 name of Table 2
Key 2 name of the Key field in Table 2
>Check Value controls deletion of records in Table 1
>Delete Flag controls Table 2's behavior when records are deleted in Table 1
>Outer Join outer join flag
<Check Value controls deletion of records in Table 2
<Delete Flag controls Table 1's behavior when records are deleted in Table 2
<Outer Join outer join flag
Object Title a relationship's title
Comments comments about the relationship record

Form opens the selected record in the Link Data form

Link Name

Name of a relationship between two classes

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry required
max. no. of characters 20
selection tool no
multilingual field no

Table 1

The name of the table where the relationship originates

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry required
max. no. of characters 13
selection tool menu with all existing tables (separated for master, relation or type table)
multilingual field no
hyperlinmk displays the table`s data class in a new form

You can enter (or select from the menu) only existing database tables.

Key 1

The name of the Key field in Table 1

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry required
max. no. of characters 255
selection tool menu with all fields of the table 1
multilingual field no

The key is used to uniquely identify records in Table 1 of the association.

Names of Key fields may contain spaces, and several fields can be selected as Key fields. DataView then generates a string of comma-separated field names. <<CLEAR >> in the selection tool deletes the list of Key fields.

Only indexed fields should be used as keys.

If you want to create an association between classes which are represented as DataView tables in the database, or which point to such classes, you can also use DataView's internal C_ID fields as keys.

Attention! Multilingual and system fields may not be used as keys in relationships.

Table 2

Name of the relationship's target table

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry required
max. no. of characters 13
selection tool menu with all existing tables (separated for master, relation or type table
multilingual field no
hyperlink displays the table`s data class in a new form

You can enter (or select from the menu) only existing database tables.

Key 2

The name of the Key field in Table 2

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry required
max. no. of characters 255
selection tool menu with all fields of the table 2
multilingual field no

The key is used to uniquely identify records in Table 2 of the relationship.

Names of Key fields may contain spaces, and several fields can be selected as Key fields. DataView then generates a string of comma-separated field names. <<CLEAR >> in the selection tool deletes the list of Key fields.

Only indexed fields should be used as keys.

If you want to create an association between classes which are represented as DataView tables in the database, or which point to such classes, you can also use DataView's internal C_ID fields as keys.

Attention! Multilingual and system fields may not be used as keys in relationships.

>Check Value

Value tested against the number of records in Table 2 when a record is deleted in Table 1

attribute master attribute for link (T_CONSTRAINT)
type, entry Integer, entry required
max. no. of characters 3
selection tool no
multilingual field no

The Check Value determines when the user can delete a record from Table 1 which is linked to records in Table 2. If the number of linked records in Table 2 is smaller than the Check Value, the record can be deleted from Table 1.

Entry:

0
deletion always possible

n
deletion only possible if the number of dependent child records is lower than n

More information: -> Checking for dependent elements

>Delete Flag

Controls Table 2's behavior when records are deleted in Table 1

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry required
max. no. of characters 1
selection tool menu with possible actions
multilingual field no

Entry:

- (default)
Linked record in Table 2 is not deleted

D
Linked record in Table 2 is deleted

N
DataView places an empty entry in the Key field of the child record. The record itself is retained (and can be relinked later).

When master tables are linked to themselves (e.g. to display item or usage lists), entire structures could be deleted recursively. For safety's sake, DataView moves anything deleted recursively to the trash first.

More information: -> Automatically deleting dependent elements

>Outer-Join

Outer Join flag, affects data display in link masks

attribute master attribute for link (T_CONSTRAINT)
type, entry logic
max. no. of characters 3
selection tool no
multilingual field no

Entry:

> ON
Makes an outer join for relationships from Table 1 to Table 2 during search queries (TABLE1 WHERE TABLE2.KEY=TABLE1.KEY(+)).

More information: -> Controlling display with outer joins

<Check Value

Value tested against the number of records in Table 1 when a record is deleted in Table 2

attribute master attribute for link (T_CONSTRAINT)
type, entry Integer, entry required
max. no. of characters 3
selection tool no
multilingual field no

The Check Value determines when the user can delete a record from Table 2 which is linked to records in Table 1. If the number of linked records in Table 1 is smaller than the Check Value, the record can be deleted from Table 2.

Entry:

0
deletion always possible

n
deletion only possible if the number of dependent child records is lower than n

More information: -> Checking for dependent elements

<Delete Flag

Controls Table 1's behavior when records are deleted in Table 2

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry required
max. no. of characters 1
selection tool menu
multilingual field no

Entry:

- (default)
Linked record in Table 1 is not deleted

D
Linked record in Table 1 is deleted

N
DataView places an empty entry in the Key field of the child record. The record itself is retained (and can be relinked later).

When master tables are linked to themselves (e.g. to display item or usage lists), entire structures could be deleted recursively. For safety's sake, DataView moves anything deleted recursively to the trash first.

More information: -> Automatically deleting dependent elements

<Outer-Join

Outer Join flag, affects data display in link masks

attribute master attribute for link (T_CONSTRAINT)
type, entry logic
max. no. of characters 3
selection tool no
multilingual field no

Entry:

> ON
Makes an outer join for relationships from Table 2 to Table 1 during search queries (TABLE2 WHERE TABLE1.KEY=TABLE2.KEY(+)).

More information: -> Controlling display with outer joins

Object Title

A relationship's title

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry optional
max. no. of characters 20
selection tool no
multilingual field yes

The title is used in error messages.

Note! You should always give your objects a title. If you don't, error messages will only contain the object's key, and you won't be able to find the object in a Search mask.

Comments

Comments about the relationship record

attribute master attribute for link (T_CONSTRAINT)
type, entry string, entry optional
max. no. of characters 255
selection tool no
multilingual field no

Form

Opens the Link Data form for the selected record.