Skip to content

The Moving Parts

By the end of this chapter you can name every part of a NocoDB installation and say where your data actually sleeps at night — the fact that makes chapters 11 and 13 (external databases, backups) fall into place.

The server and the web app

NocoDB is one program: a server, written in Node.js, that you start and leave running. It serves two things on one port — by default 8080, in this guide's lab 18104. The first is the web app, the grid interface, which is a single-page application the browser downloads once and then drives entirely by talking to the second thing: the REST API, the same interface chapter 9 gives to your own scripts. There is no separate "admin program". The lab proved the app loads by fetching its page and its script bundle; everything else in the lab was done through the API, which is the same road the app itself travels.

The metadata database

The server needs somewhere to keep its own knowledge: user accounts, which bases exist, what fields each table has, who may see what. That is the metadata database. By default it is a single SQLite file named noco.db, created in the tool directory on first start. The lab opened it afterwards (transcript t11) and counted 113 tables, almost all of them NocoDB's own bookkeeping — nc_users_v2, nc_bases_v2, nc_columns_v2, nc_views_v2, nc_api_tokens, and a hundred more.

Two settings move this file, and chapter 3 uses both: NC_TOOL_DIR chooses the folder it lives in, and NC_DB can point the metadata at a PostgreSQL or MySQL server instead — the setup you would choose for a busy multi-user install.

Workspace, base, source

Inside the server, organisation runs in three layers:

  • A workspace is the outermost container — one is created for you, called Default Workspace.
  • A base is one project's home: a set of tables that belong together, with its own members and roles. This guide's lab base is Workshop Inventory.
  • A source is where a base's tables physically live. Every base starts with one source. With the default setup that source is the same SQLite file as the metadata — the lab's data tables sat inside noco.db as ordinary tables (nc_jbl____Items, nc_jbl____Locations) alongside the bookkeeping. A base can gain further sources that are external databases; that is chapter 11.

Tables, fields, records, views

A table is one list: Items, Locations. A field is a column with a name and a type — Name is text, Quantity is a number — and the type applies to the whole column. A record is one row. A view is a way of looking at a table — the plain grid, a gallery of cards, a kanban board grouped by a category — without copying the data: three views of Items in the lab are three windows into the same eight rows.

Two vocabulary warnings. First, what most of the world calls a column, NocoDB's interface mostly calls a field; this guide follows NocoDB. Second, every table quietly carries system fields — an Id number, CreatedAt, UpdatedAt, who created and last changed the row — which the lab saw added automatically to both of its tables. Chapter 5 lists the field types, including the three that make tables work together: link, lookup and rollup.