keepcalculator

06 Numbers and Powers

Link Databases in Notion: How to Connect Tables

Card No. 06·49525 · Updated · Standard formula, shown below

To link databases in Notion, you use the “Relation” property, which connects two database tables so entries can reference each other. You create a relation by adding a Relation property to one database, selecting the other database, and then choosing which records to connect. This lets you build everything from simple task-to-project links to complex multi-database systems.

What Is a Database Relation?

A relation in Notion is a property type that creates a connection between two databases. Think of it like a foreign key in a traditional relational database, but with a visual, clickable interface. When you add a relation property to a database, you choose a second database to connect to. Each entry in the first database can then be linked to one or more entries in the second database. For example, a “Tasks” database can have a relation to a “Projects” database, so each task is associated with a specific project.

Relations are bidirectional. When you create a relation, Notion automatically adds a corresponding relation property to the other database. This means you can see, from a project, all the tasks linked to it. This two-way connection is what makes relations so powerful for organizing information.

How to Create a Relation Between Two Databases

Creating a relation is straightforward, but the exact steps depend on whether you are using a full-page database or an inline database. Here is the general process:

  1. Open your database (or create a new one).
  2. Click the “+” button in the properties row (the header row of the table) to add a new property.
  3. Name the property (e.g., “Related Project”).
  4. Select “Relation” from the property type list.
  5. In the pop-up, choose the database you want to connect to. You can search for it by name.
  6. Click “Create relation.” Notion will add a relation property to the other database automatically.
  7. Now, in any entry, click the relation cell and select the record(s) you want to link. You can also type to search.

If you are using a board, list, or calendar view, the process is the same—the property appears in the entry’s properties panel.

Relation vs. Rollup: What’s the Difference?

Many people confuse relations with rollups, but they serve different purposes. A relation simply connects two records. A rollup, on the other hand, pulls information from a related database and displays it in a property. For example, if you have a relation from Tasks to Projects, you can add a rollup property to the Tasks database that shows the project’s due date or status. Rollups can also perform calculations, like counting the number of linked tasks or summing their estimated hours.

To add a rollup, you first need a relation property. Then add a new property, choose “Rollup,” select the relation property, and then choose the property from the other database you want to display. You can also set an aggregation function (e.g., Count, Sum, Average) if you want a calculated value.

Common Use Cases for Linked Databases

Relations are useful in almost any scenario where you have two sets of data that interact. Here are some real-world examples:

  • Project Management: A “Tasks” database linked to a “Projects” database. Each task belongs to a project, and you can see all tasks for a project from the project page.
  • CRM: A “Contacts” database linked to a “Companies” database. Each contact works at a company, and you can view all contacts at a company.
  • Content Planning: A “Articles” database linked to a “Topics” database. Each article covers a topic, and you can see all articles on a topic.
  • Inventory: A “Products” database linked to a “Suppliers” database. Each product has a supplier, and you can see all products from a supplier.
  • Habit Tracking: A “Habits” database linked to a “Daily Log” database. Each day you log which habits you completed.

In each case, the relation eliminates duplication and keeps your data consistent. You change a project name once, and all linked tasks reflect the change.

How to Choose Between a Relation and a Single-Select

Sometimes you might be tempted to use a simple select property instead of a relation. For example, instead of linking to a Projects database, you could have a “Project” select property with options like “Website Redesign” and “Mobile App.” But this has drawbacks:

  • Data duplication: If you want to add a due date to a project, you’d have to add it to every task. With a relation, you store the due date once in the Projects database.
  • Inconsistency: With a select, you might accidentally type “Web Redesign” and “Website Redesign” as two different options, creating confusion.
  • Limited views: You can’t create a board view of projects and see tasks grouped under each project unless you use a relation.

Use a relation when you have a separate set of data that has its own properties, or when you need to group or filter by that data across multiple entries. Use a select when the option is just a simple label with no additional information.

Common Problems and How to Fix Them

Here are a few issues you might run into when linking databases:

  • Can’t find the database to link: Make sure the database is in the same workspace and that you have access to it. If it’s inside a page that is not shared, you might not see it.
  • Relation property is greyed out: This usually happens when you are in a locked database or a view that doesn’t allow editing. Check the database settings and the view’s “Lock” option.
  • Rollup shows “No data”: This means the relation is empty for that entry, or the rollup is set to a property that doesn’t exist. Double-check the relation and the rollup’s target property.
  • Too many relations slow down your workspace: Each relation adds a small amount of overhead. If you have thousands of relations, you might notice slower loading. Try to keep relations focused and avoid unnecessary connections.
  • Accidentally created a relation to the same database: Notion allows self-relations (e.g., a task linked to another task). If you didn’t intend that, delete the property and recreate it.

If you’re having trouble with a specific relation, try deleting the property and recreating it. This often resolves glitches.

Best Practices for Using Relations

To get the most out of linked databases, follow these tips:

  • Name relations clearly: Use names that describe the relationship, like “Parent Project” or “Related Contact.”
  • Use rollups to display key information: Instead of clicking into each relation, use rollups to show important details (e.g., project status) directly in your table.
  • Limit the number of relations per database: Too many relations can clutter your database and make it confusing. Aim for only the essential connections.
  • Use linked views to filter: On a project page, you can add a linked view of your Tasks database, filtered by the relation to that project. This gives you a dedicated task list for each project.
  • Consider using a “Database of Databases” for complex setups: If you have many databases that need to interact, you can create a central database that lists all your databases and use relations to connect them. This is an advanced pattern but can be very powerful.

Frequently Asked Questions

Can I link a database to itself?

Yes, you can create a self-relation. This is useful for hierarchical data, like a task that has subtasks. When you add a relation property, you can choose the same database. Notion will create two relation properties (e.g., “Subtasks” and “Parent task”) to manage the hierarchy.

How do I show a relation as a column in a table?

The relation property appears as a column by default in table views. If you don’t see it, click the “•••” menu in the top-right of the database, go to “Properties,” and toggle the visibility of the relation property. You can also drag it to reorder columns.

Can I link a database to a page that is not a database?

No, relations only work between databases. If you want to link to a regular page, you can use a “Page” property or simply mention the page using the “@” symbol. But that is not a database relation.

What happens if I delete a related record?

If you delete a record that is linked to another record, the relation on the other side becomes empty. Notion does not automatically delete the other record. You will see an empty relation cell, and you can re-link or leave it blank.

Can I use relations across different pages?

Yes, as long as both databases are in the same workspace and you have access to them. The databases can be on different pages. You just need to select the correct database when creating the relation.

Is there a limit to how many relations I can have?

Notion does not have a strict limit on the number of relations per database, but performance may degrade with extremely large numbers (e.g., tens of thousands). For normal use, you won’t hit any limit.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →