Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relationship Class What is a Relationship Class (3)

Similar presentations


Presentation on theme: "Relationship Class What is a Relationship Class (3)"— Presentation transcript:

1 Relationship Class What is a Relationship Class (3)
Geography, KHU, Jinmu Choi What is a Relationship Class (3) Property of relationship class (8) Name, Origin and destination tables, Keys, Cardinality, R_Type, Message, Labels, Attributes Stacked Relationship and Rules (2) Create and delete relationship class (2) Relationship class in ArcCatalog (9) Relationship class in ArcMap (3) Relationship class vs. Join or Relate (2) Summary, Reviews and Next… GIS Project

2 Physical Structure of GDB
Geodatabase Feature datasets Spatial Reference Object classes, subtypes Features classes, subtypes Raster datasets Rasters Relationship classes Geometric networks TIN datasets nodes, edges, faces Planar topologies Locators Domains Addresses, X.Y location ZIP Codes, Place names Validation rules GIS Project

3 What is a relationship class?
Certain associations between objects in Geodatabase In an electrical network, poles support transformers In a parcel database, a parcel will have one or many owners Relationships can exist between spatial and nonspatial objects Relationships are stored in a relationship class GIS Project

4 Anatomy of a Relationship
Once you have created a relationship between two tables, you can access data stored in one of the tables from the other One obvious characteristic is the notion of cardinality Cardinality describes how many objects of one type are related to the objects of another type GIS Project

5 Relationship Properties
When you create a relationship class, you must define its properties The properties tell ArcGIS exactly how the tables should relate to each other Relationship properties Name Origin, destination tables Relationship types Labels Message Cardinality Attributes Keys GIS Project

6 R-Property: Tables with Key
Primary table: origin table Has primary key Related table: destination table Has foreign key The key fields must store data of the same type GIS Project

7 R-Property: Relationship Types
Two types of relationships Simple and Composite Simple relationships exist between two tables whose objects can exist independently of one another Ex: if you delete a parcel record in the origin table, the related owner record in the destination table remains Simple relationships can have any type of cardinality In composite relationships, destination objects cannot exist without an origin object Ex: electric transformers are mounted on a utility pole and, therefore, transformer features cannot exist without a pole feature Composite relationships can have one-to-one or one-to-many cardinality GIS Project

8 Relationship classes have forward and backward path labels
R-Property: Labels Relationship classes have forward and backward path labels The forward path label displays when you're navigating from the origin table to the destination table: a pole “support” a transformer The backward path label displays when you're navigating from the destination to the origin table: “is mounted on” GIS Project

9 R-Property: Messaging
No message with simple relationship When related objects change, no messages are sent between the tables EX: if you delete a parcel record in the origin table, the related owner record in the destination table remains Only the value in the foreign key field is deleted, thus removing the owner's relationship with that parcel Message with composite relationships By default, composite relationship classes have forward messaging If the origin object is deleted, rotated, or moved, related objects in the destination table are deleted, rotated, or moved with the origin object GIS Project

10 R-Property: Cardinality
How records in two tables relate to one another Each parcel is owned by only one person One parcel is jointly owned by several people Several parcels are owned by one person Multiple parcels are jointly owned by multiple people Four types of Cardinality Cardinality is determined by the role that each table plays in the relationship GIS Project

11 R-Property: Attribute
1-1, 1-M relationship classes may have attributes in a table M-N relationship class requires a new table to store foreign keys to make the relationship This table can also have other fields to store attribute describing the relationship itself Ex: in a relationship between parcels and owners, an attribute of the relationship may be the percentage of ownership GIS Project

12 Attributed Relationship
Attributed relationship can be specified during the creation of new relationship class GIS Project

13 Stacked Relationship To create a relationship between more than two tables, you can set up a stacked relationship Table A is connected to table C through table B To create a stacked relationship, First, create a relationship class relating table A with table B Then, create a second relationship class relating table B with table C Example: Fire station – Personnel - Equipments GIS Project

14 Relationship Rules After defining the properties, you can create rules
Which objects or subtypes from the origin table can be related to which objects or subtypes in the destination table They can also be used to specify a valid cardinality range for related objects or subtypes EX: wood poles may be able to support from 0 to 3 transformers, whereas steel poles may support 0 to 5 transformers GIS Project

15 Create Relationship Relationship between two tables
is stored in a relationship class Relationships persist for the life of the relationship class Created in ArcCatalog A relationship class can be created inside a feature dataset or at the root level of the geodatabase Tables participating in the relationship class must be in the same geodatabase GIS Project

16 Delete Relationship Once you have created a relationship class, you cannot modify its properties If you delete a feature class or nonspatial table that participates in a relationship class, then the relationship class is also deleted Only two tables can be related in a single relationship class GIS Project

17 Relationship class in ArcCatalog
Relationship classes can exist both inside feature datasets and at the root level of the geodatabase To examine relationship, use Relationship tab in the Feature Class Property or Table Property ArcCatalog contains tools to create, delete, and manage relationship classes GIS Project

18 Relationship class in ArcCatalog
For detain property, click Properties… button GIS Project

19 Creating a simple Relationship
In ArcCatalog, right-click geodatabase Point to New Select Relationship Class GIS Project

20 Creating a simple Relationship
GIS Project

21 Creating a Composite Relationship
Same steps with simple relationship class for name, origin and destination tables GIS Project

22 GIS Project

23 Creating Attributed Relationship
Whether simple or composite, a relationship class can have attributes GIS Project

24 Creating Relationship Rule
Right click the relationship class Click Properties (Relationship Class Properties) Click Rule tab GIS Project

25 Managing Relationship Class
Renaming Deleting GIS Project

26 Relationship Class in ArcMap
Once the relationship between feature classes and tables are created, you can use the relationship in ArcMap When you identity a feature, it will open all the related objects with the feature attributes You can use related table’s attribute for labeling and symbolization For editing, when you select a feature, you can edit the properties of its related objects With ArcMap, you can add or delete a relationship in existing relationship class GIS Project

27 Exploring related object of a feature
GIS Project

28 Exploring related object of an object
GIS Project

29 Rel.-classes vs. Join or Relate
Relationship classes Stored with the data in a geodatabase Allow greater interaction in editing among related objects Allow to build behavior into the relationship Deletion of one feature could delete related feature Join or Relate Performed without influencing the data in a geodatabase Stored with the map document and are not geodatabase specific Can establish relationships among data in different geodatabases or outside of the geodatabase GIS Project

30 Using related Field in ArcMap
GIS Project

31 Summary Create and delete relationship class Stacked Relationship
Property of relationship class Name, Origin and destination tables, Keys, Cardinality, R_Type, Message, Labels, Attributes Relationship rules Relationship class in ArcCatalog Relationship class in ArcMap Relationship class vs. Join or Relate GIS Project

32 Next… Lab: Working with Relationships Geometry of Features
Read: Modeling our World Ch6 GIS Project


Download ppt "Relationship Class What is a Relationship Class (3)"

Similar presentations


Ads by Google