C1[Contact] S2[Song] --> C1 S3[Song] --> C1 end subgraph Rollups["⌕ Rollups"] A1[Album] --> |"count"| N1["3 tracks"] A1 --> |"sum"| N2["12:34"] end subgraph Formulas["𝛾 Formulas"] F1[First] --> |+| F2[Last] F2 --> F3["Full Name"] end Relations --> Rollups --> Formulas classDef relation fill:#fef3c7,stroke:#d97706,color:#78350f classDef rollup fill:#ede9fe,stroke:#7c3aed,color:#4c1d95 classDef formula fill:#d1fae5,stroke:#059669,color:#064e3b class S1,S2,S3,C1 relation class A1,N1,N2 rollup class F1,F2,F3 formula"> C1[Contact] S2[Song] --> C1 S3[Song] --> C1 end subgraph Rollups["⌕ Rollups"] A1[Album] --> |"count"| N1["3 tracks"] A1 --> |"sum"| N2["12:34"] end subgraph Formulas["𝛾 Formulas"] F1[First] --> |+| F2[Last] F2 --> F3["Full Name"] end Relations --> Rollups --> Formulas classDef relation fill:#fef3c7,stroke:#d97706,color:#78350f classDef rollup fill:#ede9fe,stroke:#7c3aed,color:#4c1d95 classDef formula fill:#d1fae5,stroke:#059669,color:#064e3b class S1,S2,S3,C1 relation class A1,N1,N2 rollup class F1,F2,F3 formula"> C1[Contact] S2[Song] --> C1 S3[Song] --> C1 end subgraph Rollups["⌕ Rollups"] A1[Album] --> |"count"| N1["3 tracks"] A1 --> |"sum"| N2["12:34"] end subgraph Formulas["𝛾 Formulas"] F1[First] --> |+| F2[Last] F2 --> F3["Full Name"] end Relations --> Rollups --> Formulas classDef relation fill:#fef3c7,stroke:#d97706,color:#78350f classDef rollup fill:#ede9fe,stroke:#7c3aed,color:#4c1d95 classDef formula fill:#d1fae5,stroke:#059669,color:#064e3b class S1,S2,S3,C1 relation class A1,N1,N2 rollup class F1,F2,F3 formula">

<aside> 🔗

TL;DR: Notion's databases support relations, rollups, and formulas — the building blocks for modeling connected data. Understanding how these work conceptually (even if you never build a system yourself) helps you evaluate tools, ask better questions, and understand why well-designed systems behave the way they do.

</aside>


flowchart LR
    subgraph Relations["↗ Relations"]
        S1[Song] --> C1[Contact]
        S2[Song] --> C1
        S3[Song] --> C1
    end
    
    subgraph Rollups["⌕ Rollups"]
        A1[Album] --> |"count"| N1["3 tracks"]
        A1 --> |"sum"| N2["12:34"]
    end
    
    subgraph Formulas["𝛾 Formulas"]
        F1[First] --> |+| F2[Last]
        F2 --> F3["Full Name"]
    end
    
    Relations --> Rollups --> Formulas
    
    classDef relation fill:#fef3c7,stroke:#d97706,color:#78350f
    classDef rollup fill:#ede9fe,stroke:#7c3aed,color:#4c1d95
    classDef formula fill:#d1fae5,stroke:#059669,color:#064e3b
    
    class S1,S2,S3,C1 relation
    class A1,N1,N2 rollup
    class F1,F2,F3 formula

The three core concepts

1. Relations: connecting records

<aside> ↗️

A relation links a record in one database to a record in another.


Instead of typing "Jordan Smith" in a text field on every song, you create a Contacts database with Jordan's info, then relate each song to Jordan's contact record.


Now:

One-way vs. two-way relations:

Two-way relations are more powerful but create more complexity. Choose based on whether you actually need to navigate both directions.


2. Rollups: pulling data across relations

<aside> ⌕

A rollup pulls data from related records and aggregates it.


If your Album relates to multiple Songs, a rollup can:


Rollups let you ask questions across your related data without manually counting or calculating.

</aside>

Common rollup operations: