---
title: "Nesting Buckets with Upstream and Downstream Relationships"
url: "https://help.ontraccr.com/en/article/nesting-buckets-with-upstream-and-downstream-relationships"
language: "en"
last_updated: "2025-06-08T18:55:57.088Z"
---

# Nesting Buckets with Upstream and Downstream Relationships

## **🧩 Nesting Buckets with Upstream and Downstream Relationships**  
 

Ontraccr’s bucket system supports **nesting**, allowing you to create layered databases that reflect real-world data relationships. This structure helps you model multi-level hierarchies like contracts → projects → equipment, or highways → checkpoints → GPS data.

* * *

## **🧭 What Are Upstream and Downstream Relationships?**

**Upstream (Parent)**: Entities linked *to* the bucket

→ Examples: customers, other buckets

**Downstream (Child)**: Entities this bucket links *to*

→ Examples: projects, equipment, other buckets

These relationships are defined when creating a bucket and control how data is filtered and linked.

* * *

## **🔁 Buckets Can Be Nested**

You can link **a bucket to another bucket** in both directions:

-   Make one bucket the **parent** of another (upstream)
-   Make one bucket the **child** of another (downstream)

✔ There is no mention of a limit to how many layers you can nest

✔ You can mix and match with customers, projects, equipment, and other buckets

* * *

## **📊 Use Case: Multi-Level Project Tracking**

Example structure:

1.  **Bucket A**: Highway Segment (linked upstream to a customer)
2.  **Bucket B**: Checkpoints (child of Highway Segment)
3.  **Bucket C**: Equipment (child of a Checkpoint)

This allows you to create deeply structured data chains. For example:

Select a customer → See their highways → Select a highway → See checkpoints → Select a checkpoint → See equipment

* * *

## **🔄 Field Behavior with Nesting**

Nested relationships directly affect smart filtering:

-   When you select an upstream item, downstream fields are automatically filtered
-   This chaining can occur across multiple layers, as long as each bucket is linked accordingly

* * *

## **🔁 Many-to-Many Linking Options**

When setting up links between buckets:

-   You may be prompted to specify whether a relationship should be:
    -   **One-to-one** (each item links to only one other)
    -   **One-to-many** (each item can link to multiple others)

✔ You choose this explicitly during bucket setup when prompted (e.g. “Should multi-site inspections link to one or many?”)

* * *

## 🧾 **Summary**

-   Buckets support **nested relationships** through parent/child (upstream/downstream) linking
-   You can link **buckets to other buckets** in both directions
-   These relationships power **smart filtering** and enable deeply connected data models
-   Relationships can be **one-to-one** or **one-to-many**, based on how you configure each link

Nesting buckets gives you the flexibility to model multi-layered, interdependent data systems with precision.
