Aras Developer
Development

Relationships in Aras Aren't Foreign Keys — They're Full Items

Daan Theoden
#relationships#Aras Innovator#data modeling#AML#PLM
Aras Innovator Relationship Diagram

Relationships in Aras Innovator are often misunderstood. Developers accustomed to traditional relational databases may treat them as simple foreign key references, but in Aras, relationships are far more complex. They are full-fledged items with their own properties, behaviors, and security settings, enabling advanced functionality like versioning and lifecycle management.

In Aras Innovator, relationships are implemented as first-class items called Relation Items. Each relationship has its own unique ID, properties, and behaviors, making them more versatile than traditional foreign key relationships. This design allows for granular control over how data is connected, queried, and secured, which is essential in enterprise PLM systems.

What You Will Learn

  • Why Aras relationships are implemented as Relation Items instead of foreign keys.
  • How RelationshipTypes serve as templates for connections between items.
  • How to query and configure relationships using AML.
  • The implications of relationship-specific properties, security, and versioning.

Understanding Relationships as Relation Items

In Aras Innovator, relationships are not just connections between two items; they are items themselves. This means that each relationship has its own identity, properties, and lifecycle. For example, a relationship between a Part and a Document can store metadata such as the relationship’s creation date, its creator, or even custom properties like “Approval Status.”

RelationshipTypes vs. Relation Items

A RelationshipType defines the template for how two items can be connected. It specifies the source and target item types, as well as any default properties. However, the actual relationship between two items is a Relation Item, which inherits its structure from the RelationshipType but can have additional properties or behaviors.

For example, consider a RelationshipType called “Part_Document.” This defines how Parts and Documents can be linked. When you create a relationship between a specific Part and Document, you’re creating a Relation Item that stores additional information, such as the relationship’s version or its security settings.

Querying Relationships with AML

Because relationships are items, you can query them using AML just like any other item. For example, to retrieve all relationships between a specific Part and Document, you can use the following AML query:

<AML>
  <Item type="Relationship" action="get">
    <source_id>Part_ID_Here</source_id>
    <related_id>Document_ID_Here</related_id>
  </Item>
</AML>

This query retrieves the Relation Items that connect the specified Part and Document, allowing you to access their properties and behaviors.

Common Pitfalls

  • Treating Relationships as Foreign Keys: Assuming relationships are simple connections can lead to missed opportunities for leveraging their full capabilities.
  • Ignoring Relationship Properties: Overlooking properties like versioning or security settings can result in incomplete or insecure data models.
  • Misconfiguring RelationshipTypes: Incorrectly defining RelationshipTypes can lead to invalid or unintended connections between items.

Summary

  • Relationships in Aras Innovator are implemented as Relation Items, not foreign keys.
  • Each relationship has its own ID, properties, and behaviors.
  • RelationshipTypes define templates for connections, while Relation Items represent actual relationships.
  • Relationships can be queried and configured using AML, enabling advanced functionality.

Understanding the complexity of relationships in Aras Innovator is key to building robust and scalable PLM solutions. By treating relationships as full items, you can unlock their full potential for data modeling, security, and versioning. For further exploration, refer to the official Aras documentation on RelationshipTypes and AML queries.