Thursday, 5 May 2011

The mythical ‘attributed relationship’ in ArcGIS

Following on from a recent post on Relationship classes (and other things) in ArcGIS I thought I’d take a look at a confusing term that’s banded around in ArcGIS documentation, namely the attributed relationship.
Firstly I have noticed that there are 2 variations on the term: attribute relationship and attributed relationship. These 2 terms, although painfully similar, refer to quite different concepts.
The book Modeling Our World (Second Edition) draws a distinction between spatial relationships and attribute relationships:
Modeling with spatial relationships
Your first choice for modeling relationships is to use the GIS to manage the spatial relationships inherent among features… [snip] …
Modeling with attribute relationships
There are also many associations that require attribute relationships to be defined. You can have an association between a geographic feature, such as a parcel of land, and a non-geographic entity, such as one or more parcel owners… [snip] …
Features in feature classes and rows in tables can have attribute relationships established between them through a common field called a key… [snip] … You can make these associations in several ways, including joining or relating tales temporarily in your map or by creating relationship classes in your geodatabase that maintains more permanent associations.” *
So here the definition of an attribute relationship is quite simple; an attribute relationship refers to a relationship between a feature class and a table. That’s it.
A few pages on you get this:
Attributed relationship classes
An attributed relationship class is a type of relationship class that uses a table to store the key values for each individual relationship. Because of this, attributes can be optionally added to each relationship.” **
So, the definition of an attributed relationship is also simple but more specific; an attributed relationship is a relationship class with additional attributes other than just the keys.
I also came across this explanation in an old ESRI PDF:
If a relationship class is not attributed and does not have a cardinality of many-to-many, it is stored as a set of foreign keys on the feature or object classes. Attributed relationships are stored in tables.
Again this seems to confirm that an attributed relationship is just a relationship class (which I visualise as just a database link table) with some extra columns for additional attributes.
NB: If you are programming against ArcGIS you will find that there is an AttributedRelationship class, so from an API point of view the attributed relationship is a first class entity. I’m afraid I can’t comment on this aspect because I’ve yet to encounter it.
If you search ESRI documentation you’ll see the two terms coming up quite frequently. They express the notion that there can be relationships other than pure spatial ones between entities in the geodatabase and that relationship classes specifically can have attributes other than key values.


* p.78 – p79, Modeling Our World (Second Edition), Michael Zeiler, ISBN 978-1-58948-278-4
** p.85, Modeling Our World (Second Edition), Michael Zeiler, ISBN 978-1-58948-278-4
Thursday, 5 May 2011