Relation Dataset
A dataset used to store association relationships between objects of two datasets. This type of dataset can permanently store relationships between objects in one dataset and objects in another dataset, serving as an advanced management mechanism compatible with both spatial data and non-spatial data.
For example, dataset A stores information about immovable property units (parcels) within an administrative region (e.g., property unit number, land use, area), and dataset B stores information about property rights holders (e.g., name, ID number, contact phone, property unit number). By creating an association between dataset A and dataset B based on the key field "property unit number," you can instantly link and retrieve all information about the rights holder corresponding to a specific parcel when browsing or querying dataset A. When urban planning involves land acquisition or land use adjustments for specific parcels, this association enables precise and rapid communication with relevant rights holders.
Source Data and Link Data
Source Dataset
The dataset corresponding to the relation.
Source Object
An object in the source dataset. As shown in the figure below, each row (excluding the header) represents an object.
Source Primary Key
The field in the source dataset associated with the relation.
Relation
The dataset corresponding to the source dataset.
Referenced Object
An object in the relation. As shown in the figure below, each row (excluding the header) represents an object.
Association Primary Key
The field in the relation associated with the source dataset.
Relationship Types
SuperMap iDesktopX categorizes relationship types in relation datasets into weak association and strong association.
Weak Association
In a weak association, deleting a source object sets the key field value of the referenced object to null but does not delete the referenced object. Not supported in the current version.
As shown below, deleting the object with property unit number "11111" clears the cell value "11111" in the property unit number column of the relation.
Strong Association
In a strong association, deleting a source object also deletes the referenced object. Not supported in the current version.
As shown below, deleting the object with property unit number "11111" simultaneously deletes objects with property unit number "11111" in the relation.
Relationship Models
Join One to One
One record in the source dataset can only correspond to one record in the relation, and one record in the relation can only correspond to one record in the source dataset.
As shown below, in the student table and student card table, one student can only correspond to one student card, and one student card can only correspond to one student.
Join One to Many
One record in the source dataset can correspond to multiple records in the relation, but one record in the relation can only correspond to one record in the source dataset.
As shown below, in the class table and student table, one class can consist of multiple students, but one student can only belong to one class.
Relationship Labels
Forward Relationship Label
The relationship description displayed when viewing referenced objects from a source object.
Reverse Relationship Label
The relationship description displayed when viewing source objects from a referenced object.
As shown below, with Country_R as the source data and Education_P as the link data, create a relational dataset. Set the forward relationship label to "contained by," indicating that objects in Education_P are contained by objects in Country_R; set the reverse relationship label to "contains," indicating that objects in Country_R contain objects in Education_P. When selecting an object in Country_R and viewing object properties, "contained by" appears after the Education_P dataset; when selecting an object in Education_P and viewing object properties, "contains" appears after the Country_R dataset.