How to model your Baserow data

How to Model your Baserow Data

What is data modeling?

Data modelling, in the context of Baserow, is the process of determining the appropriate tables and fields to create in your database to accurately represent your data.

Why does data modeling matter?

Incorrect data modelling can result in duplicate entries, leading to unnecessary work and potential errors if updates are missed. It can also lead to empty cells, reducing the usability and visibility of your data.

Getting your initial data structure right is crucial. Migrating to a new structure after adding many rows is difficult and time-consuming, so it’s best to get it right from the start.

What are the best practices?

When modelling data in Baserow, you can generally follow the best practices for conventional relational databases. Since Baserow is a no-code database, general database best practices apply.

General guidelines to follow

  • Avoid storing multiple values in one cell, unless the field type specifically supports it (e.g., Link to table, Lookup, Multiple select, File).
  • Never manually add the same data twice. Instead, create another table that can be referenced.
  • Minimize empty cells by splitting data into different tables if necessary.

Example

Suppose you’re storing employee data in a Baserow database, including workplace departments and clients. The current table looks like this:

Employees table

https://baserow-media.ams3.digitaloceanspaces.com/pagedown-uploads/7b82cae1-baaa-4f25-81c1-8cf29beedf76/Screenshot\_2022-11-10\_at\_14.24.34.png

The “Clients” and “Department Address” columns contain multiple pieces of information in a single cell. To improve this, we should create separate tables for departments and clients.

Departments table

https://baserow-media.ams3.digitaloceanspaces.com/pagedown-uploads/c983c32a-f3f7-4229-a991-70d793092070/Untitled.png

Having a separate table for departments allows us to define the address once and easily update it if needed.

Clients table

https://baserow-media.ams3.digitaloceanspaces.com/pagedown-uploads/6f2b9864-2dac-4770-b077-0c6ba6d13854/Untitled 1.png

Creating a separate table for clients enables us to add additional information and make changes that automatically apply to the entire database.

Employee table

https://baserow-media.ams3.digitaloceanspaces.com/pagedown-uploads/63259632-ce97-4ea3-b816-3e9beb87b2e5/Screenshot\_2022-11-10\_at\_14.24.47.png

The employee table now links to the “Clients” and “Departments” tables.

Access additional data hidden in another table

Employee table

https://baserow-media.ams3.digitaloceanspaces.com/pagedown-uploads/7884837b-2c95-49ea-b9f0-362f784dadda/Screenshot\_2022-11-10\_at\_14.43.24.png

If you need additional information, such as the city of the department, you can add a lookup field to retrieve that data.

To learn more about Baserow and everything you can do with the platform, sign up for free!

What’s your story? Tell us how you use Baserow