Database tables (Notion): verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
Regel 40: Regel 40:
 
|}
 
|}
  
As you can see, an empty database table contains these fields
+
Note:
 +
 
 +
* There are three objects rolled into one here: ''Database table'', ''view'' and ''page''
 +
* There is hardly such a thing as a page. E.g., you cannot add other blocks
 +
 
 +
=== Default properties ==
 +
 
 +
As you can see in the example above, an empty database table contains these ''properties'':
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Property
+
! Property Name
 +
! Property Type
 
! Notes
 
! Notes
 
|-
 
|-
|
+
| Name
|
+
| Title
 +
| Interesting: Notion has a specific property type called ''Title''
 
|-
 
|-
|  
+
| Tags
|
+
| Multi-select
 +
| I really like these multi-select fields. That's much more work to code by yourself
 
|-
 
|-
 
|}
 
|}
  
 
Note:
 
 
* There are three objects rolled into one here: ''Database table'', ''view'' and ''page''
 
* There is hardly such a thing as a page. E.g., you cannot add other blocks
 
  
 
=== Example: Add an inline database ===
 
=== Example: Add an inline database ===

Versie van 9 dec 2022 17:47

One of the major functionalities of Notion, is database tables, usually (and confusingly to me) just called databases (I use these two terms interchangeably). Thanks to this functionality, you can to a certain degree, create database-driven applications, including joins and filters and fields that in Notion are called properties - Quite exciting stuff!

Move this remarks to somewhere else, eventually

  • Within Notion, there is also such a thing as a 'regular' table like you also have in e.g., LibreOffice Writer - Hence database table might not be such a bad name.
  • By default, a database table always seems to have the propertiestitle, description and tags. The description property is similar to the description field in Trello, with room for storing unlimited objects - Very handy!

This is not just a database object

It seems that in Notion, no 'traditional application development object' exists just on its own. Everything seems to have been lumped together with something else into something hybrid, like a transition from a world of clear black-and-white concepts, to one of endlessly gray amorphous blobs. Database tables are no exception: No aspect of database tables seem to just exist as they are. Sometimes you may think that you see the real thing, but just when you think you got it by the tail, it turns out to be only an illusion.

One of the consequences of this seems to be, that I can't really relate concepts in Notion to concepts that I know already from elsewhere - I found it really hard to understand things in Notion. Naturally, a solution would be that I just let go of my pre-existing concepts of what databases or web applications look like, but does that really work?

But there's hope: once you know this, life may become bearable again. Or at least you may understand why in this article, everything seems to be murky - At least, that's why I wrote this introduction: Last time I looked up this article before writing this paragraph, I got annoyed that it doesn't discuss database concept within Notion just as they are, but only in relation to other stuff. Now I know. And it's ok.

Database tables live around pages

Probably the easiest introduction to Notion database tables, is that they live around pages. They come in two flavors:

  • Inline database tables are incorporated into existing pages
  • full-page database tables acts like subpages with only the database table. I prefer to call these stand-alone database tables.

One remarkable difference between these to databases, is their difference in header

Perhaps more important than the differences between these types of database tables is their similarity: Database tables live are associated with pages.

Example: Create a stand-alone database table

Let's do this slowly, so we understand everything that's happening:

We start with an empty workspace. I've used this one before and now removed all existing objects. That seems to trigger this Importing... prompt: Maybe Notion wants to import the objects again that you see on a new workspace. Anyhow, I think we're ready to go
I created a new page: Shiny New Page. It didn't matter if I used the link + Add a page on the left, or + New page at the bottom left. Note the No pages inside note at the left under its name + the default document symbol for this page
Create a database - Full-page
No view was specified, hence I got a database with table view
I changed the name of the database table to DatabaseName and the name of the view from Table to TableView. This may help to understand the hierarchy of objects in the sidebar
The start page contains this link DatabaseName. If I remove it, I would actually delete the database

Note:

  • There are three objects rolled into one here: Database table, view and page
  • There is hardly such a thing as a page. E.g., you cannot add other blocks

= Default properties

As you can see in the example above, an empty database table contains these properties:

Property Name Property Type Notes
Name Title Interesting: Notion has a specific property type called Title
Tags Multi-select I really like these multi-select fields. That's much more work to code by yourself


Example: Add an inline database

In the same situation as before, let's add an inline database
Done! I find the object hierarchy on the left confusing: There is no difference between the situation with an inline database table and a full-page database table

Example: Create a subpage with an inline database

In the same situation as before, let's add a subpage. I had to do this four times over, for Notion already added a database if I wasn't very deliberate. This is the result - The object hierarchy (on the left) seems to make more sense now

Views

Database tables are created in conjunction with a view: A way to view the data, a bit like table view plus form view in Microsoft Access at once. See Database views (Notion) for details.

Can I have the raw table definition, please?

Can I see the 'raw database table definition'? Like Table view in Microsoft Access, or the table definition in MySQL?

No, you can't. At least not in any ordinary way.

There seem to be no regular way to just see the table definition without a view around it. But there are some ways to get close to this:

Workspace export

Seems like overkill and I'm not even sure it contains an exhaustive definition of databaases: Make an export from a workspace and inspect it. The pane on the right is a subfolder of the stuff on the left

Table view

The table view or table database view seems to be the most basic no-frills view:

  • The specialist who created a system for me in Notion, seemed to regard these views as the closest thing to the raw table definition, and so do I
  • This is why I usually start with a table view, eventhough I probably well never use it - I do like to have it as backup, in case of complications
  • When you create a new database without specifying a view, you get this view.

For more: Database views (Notion).

Peek view

With the creation of a database table and its view, an additional so-called peek view gets created. A bit like a custom Edit view on a WooCommerce product:

  • It always gets created in the same way, regardless of the view that is specified at database creation
  • But it's really a view and not just a raw table representation, because you can change its presentation.
  • But the original peek view is preserved, so you can always get back to it - And that looks again a bit like a table definition representation.

For more: Peek view (Notion).

Can I see the properties of a database table?

Ehm, yes, you may see those:

View » Properties

This is probably the most reliable approach:

Go to a view » Properties

Peek view

Go to a field (in a regular view) » Peek view

Table view

Probably the least reliable approach, but easily available:

Through table view. When you don't have this view anymore, you can recreate it

Can I at least see all database tables with their name?

See the names of the database tables? What a nerdy question. Well, maybe you can. These illustrations use the examples above:

Sidebar object hierarchy

I found the sidebar object hierarchy the most obvious place to look for the database names. They are indeed mentioned here (I don't know if that's always the case), but they have the same symbol as pages and that makes it tricky

Hoover over the name of a view

When I hoover over the name of the view, the tool tip says Table view of MyInlineDatabaseName

Add an existing database

Go to a page » new block: Link existing database
Get an overview of all data objects. I don't know what the last item is. Maybe a leftover from earlier tests

See also

Sources

Name of the database table?