Search code examples
databasefirebasegoogle-cloud-firestorenotion-api

Notion API - Notion database model is also a block?


https://developers.notion.com/reference/block

A block object represents content within Notion. Blocks can be text, lists, media, and more. A page is a type of block, too!

As far as i know, everything in Notion is a block, a page is a block has children blocks; so the database is also a block ?

If I create a Notion clone, should I go with the model like:

  • users
  • workspaces
  • blocks (page, text, image, to_do...)
  • databases

or like:

  • users
  • workspaces
  • blocks (database, page, text, image, to_do...)

Many thanks.


Solution

  • According to Notion API reference, database, page, block are three different objects. Layer by layer.

    Database objects describe the property schema of a database in Notion. Pages are the items (or children) in a database.

    The Page object contains the property values of a single Notion page. { … } Page content is available as blocks.

    Page object does not share the same properties as block object. They shouldn’t be considered as the same model.

    Suggested model design should be;

    • users
    • workspaces
    • databases
    • pages
    • blocks (text, image, to_do...)