Relations, Program Functions

How Does Notion's Self Referential Database Work?

Screen Shot 2020-05-22 at 3.19.43 PM.png

๐ŸŽ‰ New Relation Feature

What is a self-referential database? Essentially, it's the ability to edit a linked database inside a related database. Changes made to the linked database will appear in real-time. Here is an example of the function at work from the Notion team:

Here's an example of how I build profiles for people as they appear in my notes. For example, if Louis XVI appears in my notes about the French Revolution, I want to quickly write up a profile from a database labeled "Who's Who" without having to travel outside of my notes page.

Step 1: Create a relational property inside the "Notes" database.

  1. Create new property inside Notes database โ†’ click "Relation"

  2. Choose external database you wish to connect.

Screen Shot 2020-05-22 at 1.32.13 PM.png

Step 2: Create a template inside "Notes" database

  1. Locate (...) in top right hand corner โ†’ click "Templates" and "New Template"

    • Label the template something like "New Note" or "New Entry"

  2. Trigger "/linkdata" to point to desired database inside the template.

ezgif.com-video-to-gif (55).gif

Step 3: Filter linked database (optional)

  • Create a property inside linked database that calls for "Created Time."

  • If you have a large database linked inside a template and don't want every entry inside the database to appear. In other words, if you merely want it used as a remote, add this filter:

*Note: I implemented this inside the template page, by the way.

*Note: I implemented this inside the template page, by the way.

Step 4: Filter again and apply

After clicking the template within a new note, filter the database to link with the note.

Screen Shot 2020-05-22 at 2.46.07 PM.png

Give it a test run:

ezgif.com-video-to-gif (57).gif