The Notion of Shelf
Build a digital library to keep track of your beloved books, with no code, and for free.
The newest version of Notion is powerful and flexible; as a showcase, I’m sharing a demo of a books & shelves management tool, a knowledge base for books and objects.
With Notion, you can quickly set up (and publish) a project like this and make something beneficial while having un.
Before delving into the design steps: for the tech-savvy, the intriguing aspects of Notion are its integration options and API availability. I plan to build exciting projects with Notion’s behind-the-curtains mechanisms, so stay tuned.
For now, let us scratch the surface by creating the first version of a knowledge base demo for managing shelves and books.
Disclaimer: The Notion company is NOT sponsoring this article, nor do I have any business contract with it. Alas.
1. Bookcases, shelves, and the rest
Here is a simple entity diagram to tackle the problem of modeling shelves, bookcases, and the things they may contain, i.e., books and other beautiful objects that live on the shelves.
From the diagram in Figure 1, we understand that:
- A
bookcase
contains one or moreshelf
elements. - A
shelf
may contain one or morebook
[orobject
] elements. - A
book
typically involves one or more items of theperson
entity (authors, translators, editors, you name it) and may have differenttags
. - An
object
can also have a person attached to it; for example, a little piece of art may be attributed to an author/artist. - Spoiler alert: in Notion, each
book
,person,
andobject
will be described on a dedicated page.
The image below depicts all the relevant concepts.
[You can enhance the model in Figure 1 by adding other entities, such as publishing companies, places, CDs and vinyl records, etc., but we will stick with this simple model version for now.]
By the way, consider the situation in Figure 3.
One can easily model this case via a “virtual bookcase” having a single shelf. On the shelf, we will fit the books and the skull sculpture. Click here to see how we tackled this situation in the online demo.
2. How Notion sees the world
If you are new to Notion, getting acquainted with its main building blocks is crucial. (You can skip to the next section if you are proficient with Notion’s main concepts and tools).
> Pages. In Notion, the “page” idea is central: everything lives on a page. On one side, you may compare a Notion page to a web page where you can place any HTML element to do its job. But this is hugely reductive. First, each item you want to manage (e.g., a book, an author, a shelf, a meeting, and so on) has an associated page to “represent” it. Second, a page can embed many powerful Notion blocks, like lists of pages (see below) and third-party components.
> Databases. In Notion, a database is a table containing any imaginable set of objects. Each database row refers to a specific item, with a link to the item’s page. Furthermore, each item can have as many properties as needed to describe its features. To grasp how a Notion database works, consider how the book
entity is implemented in our demo: each book is represented by a row in the Book’s database, as shown in Figure 4.
For those at home with relational databases, think of a Notion database as a table on steroids. And, of course, you can create as many databases as you like. Each Notion database (table) lives on its ad-hoc “page”. Much more about Notion databases later on.
> Views. A Notion view is a projection of data from a Notion database. It can indeed be configured to represent only a portion of the underlying data, but that’s not all. Different view types show the data in profoundly different ways: for example, there is a view type that puts the underlying data on a calendar. As long as the data and data structures of the database exist behind the curtains, one can create and delete as many views as one wants.
3. Implementing the personal library with Notion
Once the key ideas about Notion are clear, creating a draft of the bookcase project is not difficult.
First, we need a Notion database for our main entities: bookcases, shelves, books, objects, and people. There is an obvious hierarchy here. But the starting point should be a friendly-looking “home page” for the library knowledge base: so in the demo, you’ll find an entry page like the one in Figure 5, featuring my cats Pi and Tau.
Note that in the sidebar, Notion shows the five primary databases configured for the project; each database contains a list of items, and each item leads to a deeper page. For example, the “Bookcases Gallery View” lists all items of the Bookcase database as a set of cards, as shown in Figure 6 (yes, I took the trouble to take a picture of each bookcase in my home and office).
Clicking on any card of the Gallery will bring you to the selected bookcase
item page, where the bookcase
properties are shown by default (please go to the demo site, and choose the “Office — Main Dark” link to follow along). To each bookcase
page, I added the following:
- a picture of the bookcase with a code for each
shelf
(if there is more than one shelf in thatbookcase
); - the Table View of all
shelf
items of the specific bookcase.
Figure 7 shows a portion of the demo page relative to the “Office — Main Dark” bookcase.
A crucial feature of Notion databases allows the enforcement of connections between different tables/databases: relation-type properties.
We will go into more detail on relation-type properties in the next section; consider, though, that I used them to connect:
- shelves to bookcases;
- books and objects to shelves;
- people to books and objects.
Figure 9 shows a typical shelf page for the demo: it is the B3 shelf of the Office Dark bookcase (divided into three cuts). The page contains the following:
- a picture of the shelf’s position with respect to its enclosing bookcase;
- the books contained on the shelf (a portion of the complete Books database);
- the portion of the Objects database for the objects on that shelf.
For each page dedicated to a specific shelf, it is easy to select, from the entire Books database, only the books related to that particular shelf: filter the Books database Position property to the desired shelf name/value (in the case of Figure 9, “Office Dark — B3” value). Save these filter settings, so they are active whenever the page is shown, and that’s it!
4. The beauty of relations
Implementing connections — also called relations —between different data collections is a classic issue: relations are the bread-and-butter of table-based database systems (they are often called relational for this reason).
The fantastic thing about Notion is how easy it makes setting up links/relations between tables (databases).
Consider, as an example, the relationship between Books and Shelves in our demo. A single book lives on a specific shelf, and each shelf can house many books — or none. Figure 10 shows how I enforced this relationship between Books and Shelves.
As one can see, the Books database/table has several properties (columns) — more or less the ones you may expect. One of these properties is the Position property, the value of which indicates the Shelf on which the book is currently placed. Note that the Position property type is set to Relation, as indicated by the diagonal arrow icon beside the property name (red box in the middle of Figure 10).
The Relation type property allows us to specify which database/table is connected to our Position property: in this case, the associated database is Shelves.
Once the Relation type is configured for a property, the values of that property can only be set to one of the “pages” of the connected Database; this constraint enforces the relationship between the two tables.
Two great things that are worth mentioning. First, the Limit option (see the rightmost box in Figure 10) decides whether a Relation type property may accept only one value or multiple values. In the case seen so far, it is clear that a book can be placed on only one shelf at a time, so the value for the Position property of the Books database should be just a single Shelf item. But consider the authors of a book: the Authors property relates to the People database, and a single book can have one or more authors; in this case, the correct setting for the Limit parameter is “No limit”.
The second remarkable thing, the toggle “Show on…”: makes the relation bi-directional. For example, when the Show on Shelves toggle is on (for the Position property), each time a shelf is assigned to a book, the book will appear on that shelf’s specific page. Eventually, the shelf’s page will automatically show its complete book set.
5. Sharing the project on the Internet
With Notion, you are always just one click away from publishing a page or project online.
The “Share” button makes publishing on the web a bliss. The links to the demo that are scattered around this article all come from the “Copy web link” option of Notion’s “Share” panel (see Figure 10).
6. Conclusions
Notion offers powerful and complex functionality along with ease of use. Our team sketched out the Bookcase & Shelves demo in a few days.
Please get in touch with us if you need help integrating Notion into your personal or business workflows. We will be glad to give a hand.