Function Description
Used to create a relational dataset in a data source, managing the association between two dataset objects. For example, dataset A stores information about real estate units (plots) in an administrative area (real estate unit number, plot usage, area), dataset B stores information about real estate rights holders (name, ID number, real estate unit number). By creating an association between dataset A and dataset B based on the key field "real estate unit number", when browsing or querying a plot in dataset A, you can instantly associate and obtain all information about the rights holder corresponding to that plot.
Before using this function, you need to note the following constraints:
- Supported dataset types: 2D point/line/region datasets, attribute datasets.
- Quantity constraint: A dataset can only create one relationship class dataset. If dataset A has already created a relational dataset with dataset B, then neither dataset A nor B can create a relational dataset with dataset C.
- Type constraint: The types of the primary key and foreign key must be consistent, but binary and date types are not supported.
- Data source types: Only PostGIS and UDB/UDBX data sources are supported; other data sources and EMS data sources are not supported.
Function Entry
- Workspace Manager -> PostGIS, UDB/UDBX Data Source Context Menu -> New Dataset -> Relation Dataset.
- Start Tab -> New Dataset Group -> Relation Dataset.
- Toolbox -> Data Management -> Relation Dataset -> Create a Relational Dataset.
Parameter description
parameter name | parameter interpretation | parameter type |
Data Source |
Sets the data source where the two to-be-related datasets are located. Defaults to the selected data source in the Workspace Manager, and can be modified. |
Datasource |
source dataset |
Sets the dataset that establishes a relationship with the relation. As in the above example, dataset A. |
String |
Source Primary Key |
Sets the field in the source dataset used to associate with the relation. Defaults to the first field of the dataset, and the corresponding field can be selected from the dropdown menu. As in the above example, the "real estate unit number" field in dataset A. |
String |
relation |
Sets the dataset that establishes a relationship with the source dataset. As in the above example, dataset B. |
String |
Associated Primary Key |
Sets the field in the associated dataset used to associate with the source dataset. Defaults to the first field of the dataset, and the corresponding field can be selected from the dropdown menu. As in the above example, the "real estate unit number" field in dataset B. |
String |
Relationship Type |
Sets the association behavior between the two dataset objects, offering weak association and strong association.
|
String |
Relationship Model |
Sets the logical model of association between the two dataset objects, including one-to-one (1:1) and one-to-many (1:N).
|
RelationshipCardinalityType |
Forward Relationship Label | Sets the relationship description when associating from the source dataset to the relation. After setting, it can be viewed through the object properties panel. | String |
Reverse Relationship Label | Sets the relationship description when associating from the relation to the source dataset. After setting, it can be viewed through the object properties panel. | String |
relation dataset |
Sets the name of the generated relation dataset, defaulting to "source_dataset_name_relation_dataset_name". Its naming rules are consistent with those of ordinary datasets:
|
String |
Output Result
Adds a new relation dataset under the data source node.