4D v14.3Creating and modifying relations |
||
|
4D v14.3
Creating and modifying relations
Creating and modifying relations
You can create or remove relations via the Structure editor or using the SQL commands of 4D. This section covers the manual creation of relations in the Design environment. For more information about using SQL statements in 4D, please refer to the 4D SQL Reference manual. You can create a relation between two tables by manually tracing a line between two fields or using the add objects menu of the tool bar. To create a relation using the Structure editor window:
To create a relation using the add objects menu:
4D displays the relation as an arrow between the two tables in the Structure editor. The shape of the beginning and end connectors as well as the N and 1 characters shown within them indicate the direction of the relation: The Inspector palette displays the properties of the relation (see Relation properties). The appearance of relations is different when they have been generated via SQL (square shaped connectors):
4D lets you delete a relation at any time. To do so:
In both cases, a warning dialog box appears so that you can confirm or cancel the operation. If you confirm it, 4D removes the linking arrows and the tables are no longer related. Any indexes of Many and One fields are not deleted. You can reestablish any relation at any time. You would do so, for example, if you mistakenly draw the relation between the wrong fields or if you want to change a relation property. 4D lets you reestablish a relation simply by drawing the relation line again. In the case of complex structures, you can select fields in the source and destination tables of a relation using the Select Source Field and Select Destination Field commands, located in the context menu of the relation. To reestablish a relation using the same two fields, double-click on the relation in the Structure editor. 4D displays the relation properties in the Inspector palette so that you can make any necessary changes. |
PROPERTIES
Product: 4D ARTICLE USAGE
4D Design Reference ( 4D v14 R2) |