31 Jul Notion Databases: An advanced tutorial
Everything in our lives is powered by databases. Whether your browsing Amazon, listening to Spotify’s Discover Weekly or browsing the New York Times’ home page, behind the scenes they’re all powered by Databases. There’s a common misconception that databases are complex and can only be created by software engineers. It’s wrong. Databases are nothing more than two (or more) spreadsheets strung together. And thanks to no-code apps like Notion, anyone can create a database without a lick of coding experience and create a CRM, personal wikis, productivity system or invoicing system.
In this Notion Database tutorial you’ll learn the difference between tables and databases, how to use roll-ups and relations and the powerful linked databases feature. Using the learning by building approach I use in my Notion course Supercharge your Productivity you’ll build a music library (i.e. an artist and song catalog) while incorporating Notion’s unique properties, views and formulas. So let’s dive in!
What is a database?
I love the Explain it like I’m 5 (ELI5) sub-reddit and here’s how I would explain a database to my 6 year old daughter:
A database is a series (i.e. 2 or more) interconnected spreadsheets. Each spreadsheet has columns and rows and they are connected using a primary key. By linking spreadsheets, you avoid having to enter the same information twice.
What makes databases so much more powerful than spreadsheets (and traditional note-taking apps like Evernote) is that they can manage large amounts of inter-connected data while giving users the ability to query and filter the data based on their specific situation and use cases.
The difference between tables and databases
We’ll jump into our tutorial with tables (and if you’re a newbie we recommend our introductory Notion tutorial covering the basics). In Notion parlance, a spreadsheet is called a table and we’ll begin our Music Library by adding a few artists.
First, create a table (Artist Table) with a series of columns (highlighting Notion’s various property types):
- Artist Name (Page)
- Birthday (Date)
- Photo (File)
- Genre (Multi-select)
Next, we’ll create a second table (Album Table) with the Album name, Release date, copies sold and Album art columns.
Now you probably noticed that we didn’t include Artists in the table. If had included the column, we’d have to type in the artist name multiple times – a process that is tedious, cannot be updated and prone to data errors.
Which sets us up for some Notion magic, using the advanced Relation property.
Creating your first relational database
Set up the Relation
They say you never forget your first database. (Actually, I just made that up… but trust me, it is a delightful feeling.) You’ve also astutely observed that we still just have two distinct spreadsheets – which is still not a database.
Next, we’ll stay on our Album Table and “assign” an artist to each album by creating a new column and using the Relation Property.
Once the column is created, it will ask you to find the database to link to (the Artists Table in our example). Then, once you click on each cell, you’ll be asked to pick the Artist that corresponds to the Album. And if you need to create a new artist, you can create it directly from that same view.
Voila, now if you visit each table, you’ll see that the a column has been added with the corresponding Artist/Album.
Create your first roll-up
Roll-ups aggregate data over similarly defined rows. Now that we’ve linked the tables into a database, we can run calculations (sum, average, count) that replicate the functionality of pivot tables (within Spreadsheets).
We’ll create a roll-up that will aggregate the copies sold at the artist level (i.e. they roll up to the artist). This will entail adding a column in the Artists Table with the Roll Up property type and the following steps:
- Setting the Relation as Album Table
- Setting the Property as Copies Sold
- Setting Calculate to Sum
The magic of Linked Databases
Now that we’ve created our first Notion database, we can apply Notion’s most powerful feature: Linked Databases. This feature lets you access the data in any table as it’s own individual block and customize how the data is presented using views such as Gallery, Kanban, List or Calendar or Table.
For our Music library, we’ll select a Gallery view, which will let us maximize the great images we have for each artist. To Create a Linked Database, you need to start on an exiting page (or create a new one) and follow these instructions:
- Hit the + sign to add a new block and select Create Linked Database.
- Pick Artists Table from the list of tables
- On the linked table, click the Add a View and select Gallery (while naming it Gallery View)
- Customize the properties by selecting the Card Preview and toggling the properties you want to display
Should I create a table or database?
With Notion’s rich feature set we should be vigilant about not falling into the trap of Shiny New Toy Syndrome (SNTS). Unless you’re setting up a complex productivity system like PARA or GTD or creating detailed money trackers there’s a good chance that a table will be more than enough. But if you’re confused about whether you should use a table or database here’s a simple test:
Will I have to type in the same data more than once?
If the answer is yes, a database would be appropriate. So if you have a table of clients, you probably will want a separate table for company names. Similarly, you’d want to use a database if you have a table of meeting notes that need to be linked to a table of clients. But if you want to create a massive list of blog post ideas for an editorial calendar, a table with many columns will be sufficient.
You’re now ready to rip using Notion’s most advanced features to create your own databases and if you need inspiration, check out the real Music Table example from this post and our full template gallery. (And don’t miss our top Notion tips and tricks.)
Want the Notion template PowerPack? (For free, obvi)
- Supercharged CRM to strengthen key relationships
- GTD task manager to focus on your big goals
- Weekly journal to stay self-accountable