Start ArcCatalog. In Catalog Tree, navigate to ...\Data\DesigningGeodatabase\Topo5k.gdb\LandUse
.
Right-click on the LandUse
feature dataset, and select New | Relationship Class. For Name of the relationship class, type LandUseToOwners
. For Origin table/feature class, select the plus sign on the left-hand side of the LandUse
feature dataset to see the LandUse
feature class. Select the LandUse
feature class. For Destination table/feature class, select the Owners
table. Click on Next.
Select Simple (peer to peer) relationship, and click on Next. For the first relationship label, type ToOwners
. For the second relationship label, type ToLandUse
. Select the None (no messages propagated) option, and click on Next. Select the cardinality M-N (many-to-many) and click on Next. Select Yes, I would like to add attributes to this relationship class, and click on Next.
For FieldName, type OwnerProcent
in the first empty row. Select Long Integer from the drop-down list. Select Yes for the Allow NULL values option, in the Field Properties section. As the primary key for the origin table, choose OBJECTID from the drop-down list, and as the foreign key, type LandUseID
. As the primary key for the origin table, choose OBJECTID, and for foreign key, type OwnerID
.
Click on Next to see a summary of your options, and select Finish to close the New Relationship Class wizard.
Right-click on the Buildings
feature dataset, and select the New | Relationship Class. For Name of the relationship class, type BuildingsRToOwners
. Repeat the previous steps, and set the relationship according to the following table:
Follow these steps to create a composite one-to-many relationship class between LandUse
(as parent objects) and BuildingsR
(as child objects):
Right-click on the LandUse
feature dataset, and select New | Relationship Class. For Name of the relationship class, type LandUseToBuildings
. For Origin table/feature class, select the LandUse
feature class. For Destination table/feature class, select the plus sign on the left-hand side of the Buildings
feature dataset, and select the BuildingsR
feature class.
Click on Next. Select Composite relationship (peer to peer) relationship and click on Next.
For the first relationship label, type ToBuildingsR
. For the second relationship label, type ToLandUse
. Select the Forward (origin to destination) option and click on Next. Select the cardinality 1-M (one-to-many), and click on Next.
Select NO, I do not want to add attributes to this relationship class and click on Next.
As the primary key, choose OBJECTID from the drop-down list, and as the foreign key, choose LandUseID
.
Click on Next to see a summary of your options, and select Finish to close the New Relationship Class wizard.
Follow these steps to add rules for the LandUseToBuildings relationship class:
In ArcCatalog, double-click on the LandUseToBuildings
relationship class to open a Relationship Class Properties dialog box. Select the Rules tab to see the subtypes for the LandUse
and BuildingsR
feature classes. You will define relationship rules, as shown in the following table:
For Origin Table/Feature class subtypes, select Other terrains
. For Destination Table/Feature class subtypes, click on the Code checkbox on the left-hand side of the Unknown
subtype. Click on Unknown
to select the subtype and to enable the Origin Cardinality and Destination Cardinality sections.
In the Destination Cardinality section, check the Specify the range of associated destination objects option. First, set the Max value by typing 10
. Leave the Min value at 0
.
For Destination Table/Feature class subtypes, click on the Code checkbox to the left of the Dwelling
subtype. Click on Dwelling
to select subtype and to enable the Origin Cardinality and Destination Cardinality sections.
In the Destination Cardinality section, check the Specify the range of associated destination objects option. First, set the Max value by typing 2
. Leave the Min value at 0
according to the previous table. The first rule says that an Other terrains
parcel subtype can have a maximum of two dwellings. You should see something similar to the following screenshot:
Select the Administrative buildings subtype, and check the Specify the range of associated destination objects option. For the Max value, type 3
. For the Min value, type 0
. This rule says that there must be between zero and three administrative buildings in a parcel (Other terrains
).
Continue to define the rules in Destination Table/Feature class subtypes for all building subtypes. For Origin Table/Feature class subtypes, select Unproductive
. Leave unchecked the Unknown
subtypes in the Destination Table/Feature class subtypes section to allow an unlimited number of Unknown
buildings.
You will permit a maximum of two Industrial and municipal
buildings and one Dwelling annex
per Unproductive
parcel. Select those subtypes from the Destination Table/Feature class subtypes section, and set the maximum value according to the previous table.
Finally, you will not permit a relationship with the rest of building types, such as Dwelling
, Administrative buildings
, and Historical sites
. Select all those subtypes from the Destination Table/Feature class subtypes section, check the Specify the range of associated destination objects option, and set the maximum values to 0
.
For the rest of the LandUse
subtypes from Origin Table/Feature class subtypes, set the Max and Min values to 0
. This will not permit BuildingsR
to associate with parcel subtypes, such as Arable
, Pasture
, Meadow
, Vineyard
, Fruit orchard
, Forest
, Hydrography
, and Transportation
.
Click on Apply and on OK to save and close the Relationship Class Properties wizard.