[Guides & How-tos]

[Guides & How-tos]

Building Relationships: Associations in Amorfs

Building Relationships: Associations in Amorfs

Building Relationships: Associations in Amorfs

13 Dec 2025

Beyond Simple Data

Most data formats can store facts: names, dates, numbers. But reality is about relationships.

  • Who works WHERE?

  • What happened WHEN?

  • Which product came FROM which supplier?

Amorfs makes relationships first-class citizens of your data.

What is an Association?

An association is a connection between concepts. In Amorfs, every association follows the same pattern our brains use:

Subject - Verb - Object

Just like in natural language:

  • "Sarah works for Acme Corp"

  • "The package was shipped from Warehouse A"

  • "This invoice is valid until December 31st"

The Two Basic Associations

While the Amorfs data model supports any relationship verb, the data format can represent traditional data using just two:

1. "has a" (the - symbol)

Shows a connection or attribute:

person [Sarah

  - employer [Acme Corp]

  - phone [555-1234]

  - office [Building 5]

]

Read as: "Sarah has an employer which is Acme Corp, has a phone which is 555-1234..."

2. "which is" (the [ ] brackets)

Shows what something actually is:

employee id [E-12345]

status [active]

Read as: "An employee id which is E-12345, a status which is active"

Recursive Power: The Game-Changer

Here's where Amorfs becomes revolutionary. Every association is itself a concept, which means associations can reference other associations.

Simple Example: Supply Chain

shipment [

  - origin [Warehouse A]

  - destination [Store B]

  - previous_shipment [

    - origin [Factory C]

    - destination [Warehouse A]

    - previous_shipment [

      - origin [Supplier D]

      - destination [Factory C]

    ]

  ]

]

Each shipment carries the context of the previous shipment. The chain creates a complete provenance trail.

Traditional Approach (What We Lost):

shipment_1: origin=Supplier_D, destination=Factory_C

shipment_2: origin=Factory_C, destination=Warehouse_A  

shipment_3: origin=Warehouse_A, destination=Store_B

Problem: The connections exist in your head, not in the data. To reconstruct the chain, you need separate logic.

Amorfs Approach (What We Gain):

The entire context flows forward through the data. Each association carries the full history.

Real-World Example: Document Revision History

document [Proposal_v3.docx

  - author [Sarah]

  - modified [2024-12-13]

  - previous version [Proposal_v2.docx

    - author [John]  

    - modified [2024-12-10]

    - previous version [Proposal_v1.docx

      - author [Sarah]

      - modified [2024-12-05]

    ]

  ]

]

The current document contains the complete history of its evolution.

Associations as First-Class Concepts

Because associations ARE concepts, they can:

1. Have their own expressions

employer [Mining Corp

  - employee [Sarah]

  - start_date [2020-01-15]

]

This employer Mining Corp relationship is a concept that can be referenced elsewhere.

2. Have metadata

transaction [

  - amount [127.50]

  - vendor [Acme Corp]

] {~0.95 source:@statement}

The transaction itself has properties: confidence level, source.

3. Be subjects or objects of other associations

country [Australia

  - state [NSW

    - city [Sydney

      - postcode [2000]

    ]

  ]

]

Each association inherits all the preceding associations, so the postcode 2000 concept carries a state, city and county.

Intrinsic vs. Contextual Associations

Amorfs distinguishes between two types of relationships:

Intrinsic (+ symbol) - "Always Has"

Properties that are inherent and unchanging:

person [Sarah Johnson

  + birth_date [1985-03-20]

  + nationality [Australian]

]

Birth date and nationality are intrinsic - they define who Sarah is fundamentally.

Contextual (- symbol) - "May Have"

Properties that depend on circumstances:

person [Sarah Johnson

  - employer [Acme Corp]

  - residence [Sydney]

  - phone [555-1234]

]

Employer, residence, and phone are contextual - they can change over time.

Why This Matters

When merging data from multiple sources:

  • Intrinsic associations help identify if two concepts are the same person. They associate the expression concept.

  • Contextual associations might differ and need conflict resolution. They associate the parent association, extending the context chain.

Nested Structures: Infinite Detail

You can nest as deeply as needed:

organization [Acme Corp

  - department [Engineering

    - team [Backend

      - developer [Sarah

        - project [API Redesign

          - task [Database Migration

            - subtask [Schema Update

              - status [In Progress]

            ]

          ]

        ]

      ]

    ]

  ]

]

Each level adds more context and specificity.

The Beauty: Self-Contained Context

Unlike traditional databases where you need multiple tables and JOIN operations:

Traditional:

  • Table: Employees

  • Table: Departments

  • Table: Projects

  • Table: Tasks

  • Needs queries to connect them

Amorfs:

employee [Sarah

  - department [Engineering

    - manager [Bob]

    - budget [500000]

  ]

  - project [API Redesign

    - deadline [2025-03-01]

    - status [Active]

  ]

]

All context travels together. Cut and paste this fragment anywhere, and it's still meaningful.

Practical Example: Invoice with Full Context

invoice [

  - number [INV-2024-001]

  - date [2024-12-13]

  - amount [1250.00

    - currency [USD]

  ]

  - vendor [Tech Supplies Inc.

    - address [

      - street [123 Business Ave]

      - city [San Francisco]

    ]

    - contact [

      - email [orders@techsupplies.com]

      - phone [+1-555-0199]

    ]

  ]

  - items [

    - item [Laptop

      - quantity [2]

      - unit_price [500.00]

    ]

    - item [Mouse  

      - quantity [5]

      - unit_price [50.00]

    ]

  ]

  - payment_terms [Net 30]

]

Everything an AI or accounting system needs to understand this invoice travels with it.

Key Takeaways

  1. Associations follow Subject-Verb-Object patterns

  2. Associations are concepts - they can be referenced and nested

  3. Recursion enables unlimited context - history and provenance flow forward

  4. Intrinsic (+) vs. Contextual (-) helps with data quality and merging

  5. Self-contained fragments maintain meaning when copied anywhere

Try This

Think about your employment history. How would you represent it in Amorfs showing:

  • Current employer

  • Previous employers

  • Dates and roles

  • Department structures

Remember: Each job is contextual (-), but the sequence is preserved through nesting.

Next: "Writing Your First Amorfs Structure" →

Relationships are what make data meaningful. Amorfs makes relationships explicit.


Beyond Simple Data

Most data formats can store facts: names, dates, numbers. But reality is about relationships.

  • Who works WHERE?

  • What happened WHEN?

  • Which product came FROM which supplier?

Amorfs makes relationships first-class citizens of your data.

What is an Association?

An association is a connection between concepts. In Amorfs, every association follows the same pattern our brains use:

Subject - Verb - Object

Just like in natural language:

  • "Sarah works for Acme Corp"

  • "The package was shipped from Warehouse A"

  • "This invoice is valid until December 31st"

The Two Basic Associations

While the Amorfs data model supports any relationship verb, the data format can represent traditional data using just two:

1. "has a" (the - symbol)

Shows a connection or attribute:

person [Sarah

  - employer [Acme Corp]

  - phone [555-1234]

  - office [Building 5]

]

Read as: "Sarah has an employer which is Acme Corp, has a phone which is 555-1234..."

2. "which is" (the [ ] brackets)

Shows what something actually is:

employee id [E-12345]

status [active]

Read as: "An employee id which is E-12345, a status which is active"

Recursive Power: The Game-Changer

Here's where Amorfs becomes revolutionary. Every association is itself a concept, which means associations can reference other associations.

Simple Example: Supply Chain

shipment [

  - origin [Warehouse A]

  - destination [Store B]

  - previous_shipment [

    - origin [Factory C]

    - destination [Warehouse A]

    - previous_shipment [

      - origin [Supplier D]

      - destination [Factory C]

    ]

  ]

]

Each shipment carries the context of the previous shipment. The chain creates a complete provenance trail.

Traditional Approach (What We Lost):

shipment_1: origin=Supplier_D, destination=Factory_C

shipment_2: origin=Factory_C, destination=Warehouse_A  

shipment_3: origin=Warehouse_A, destination=Store_B

Problem: The connections exist in your head, not in the data. To reconstruct the chain, you need separate logic.

Amorfs Approach (What We Gain):

The entire context flows forward through the data. Each association carries the full history.

Real-World Example: Document Revision History

document [Proposal_v3.docx

  - author [Sarah]

  - modified [2024-12-13]

  - previous version [Proposal_v2.docx

    - author [John]  

    - modified [2024-12-10]

    - previous version [Proposal_v1.docx

      - author [Sarah]

      - modified [2024-12-05]

    ]

  ]

]

The current document contains the complete history of its evolution.

Associations as First-Class Concepts

Because associations ARE concepts, they can:

1. Have their own expressions

employer [Mining Corp

  - employee [Sarah]

  - start_date [2020-01-15]

]

This employer Mining Corp relationship is a concept that can be referenced elsewhere.

2. Have metadata

transaction [

  - amount [127.50]

  - vendor [Acme Corp]

] {~0.95 source:@statement}

The transaction itself has properties: confidence level, source.

3. Be subjects or objects of other associations

country [Australia

  - state [NSW

    - city [Sydney

      - postcode [2000]

    ]

  ]

]

Each association inherits all the preceding associations, so the postcode 2000 concept carries a state, city and county.

Intrinsic vs. Contextual Associations

Amorfs distinguishes between two types of relationships:

Intrinsic (+ symbol) - "Always Has"

Properties that are inherent and unchanging:

person [Sarah Johnson

  + birth_date [1985-03-20]

  + nationality [Australian]

]

Birth date and nationality are intrinsic - they define who Sarah is fundamentally.

Contextual (- symbol) - "May Have"

Properties that depend on circumstances:

person [Sarah Johnson

  - employer [Acme Corp]

  - residence [Sydney]

  - phone [555-1234]

]

Employer, residence, and phone are contextual - they can change over time.

Why This Matters

When merging data from multiple sources:

  • Intrinsic associations help identify if two concepts are the same person. They associate the expression concept.

  • Contextual associations might differ and need conflict resolution. They associate the parent association, extending the context chain.

Nested Structures: Infinite Detail

You can nest as deeply as needed:

organization [Acme Corp

  - department [Engineering

    - team [Backend

      - developer [Sarah

        - project [API Redesign

          - task [Database Migration

            - subtask [Schema Update

              - status [In Progress]

            ]

          ]

        ]

      ]

    ]

  ]

]

Each level adds more context and specificity.

The Beauty: Self-Contained Context

Unlike traditional databases where you need multiple tables and JOIN operations:

Traditional:

  • Table: Employees

  • Table: Departments

  • Table: Projects

  • Table: Tasks

  • Needs queries to connect them

Amorfs:

employee [Sarah

  - department [Engineering

    - manager [Bob]

    - budget [500000]

  ]

  - project [API Redesign

    - deadline [2025-03-01]

    - status [Active]

  ]

]

All context travels together. Cut and paste this fragment anywhere, and it's still meaningful.

Practical Example: Invoice with Full Context

invoice [

  - number [INV-2024-001]

  - date [2024-12-13]

  - amount [1250.00

    - currency [USD]

  ]

  - vendor [Tech Supplies Inc.

    - address [

      - street [123 Business Ave]

      - city [San Francisco]

    ]

    - contact [

      - email [orders@techsupplies.com]

      - phone [+1-555-0199]

    ]

  ]

  - items [

    - item [Laptop

      - quantity [2]

      - unit_price [500.00]

    ]

    - item [Mouse  

      - quantity [5]

      - unit_price [50.00]

    ]

  ]

  - payment_terms [Net 30]

]

Everything an AI or accounting system needs to understand this invoice travels with it.

Key Takeaways

  1. Associations follow Subject-Verb-Object patterns

  2. Associations are concepts - they can be referenced and nested

  3. Recursion enables unlimited context - history and provenance flow forward

  4. Intrinsic (+) vs. Contextual (-) helps with data quality and merging

  5. Self-contained fragments maintain meaning when copied anywhere

Try This

Think about your employment history. How would you represent it in Amorfs showing:

  • Current employer

  • Previous employers

  • Dates and roles

  • Department structures

Remember: Each job is contextual (-), but the sequence is preserved through nesting.

Next: "Writing Your First Amorfs Structure" →

Relationships are what make data meaningful. Amorfs makes relationships explicit.


Share to

Don’t want to miss anything?

Get weekly updates on the newest posts, events and tips right in your mailbox.

© 2025 Amorfs. All rights reserved.

Don’t want to miss anything?

Get weekly updates on the newest posts, events and tips right in your mailbox.

© 2025 Amorfs. All rights reserved.

Don’t want to miss anything?

Get weekly updates on the newest posts, events and tips right in your mailbox.

© 2025 Amorfs. All rights reserved.