Database
Store your app's data in MongoDB collections that follow a schema you design, and get a ready API for every collection.
The Database module stores your app's data — orders, products, bookings — in MongoDB collections. You describe each collection once with a schema; Norbix then checks every write against it, builds the record form in Cloud, and serves a create, read, update, delete and query API for the collection. The data lives in MongoDB: your own cluster, or a managed Atlas Flex cluster that Norbix runs for you.
Enable the module
Open a project and choose Database in the left menu. While the module is off, Cloud shows this page; press ENABLE. You need a project role that can manage modules (for example Administrator).

After ENABLE, Cloud opens Database → Collections. A new project already has one database integration, Primary Database, so you can create a collection at once. To turn the module off again, see Settings — no data is deleted.

Module map
Your collections: their schemas, records, triggers and list columns and index warnings.
The schema contract for hand-written and AI-written schemas: the field types with every keyword and refusal, references, nested forms and arrays.
Lists of terms (categories, tags, places) that records can point at, in a tree when needed.
Saved MongoDB aggregation pipelines that your app runs by id.
The MongoDB databases your project stores its collections in.
Turn the module off for the project.
Your first collection
Check the integration — a new project has Primary Database as the default; connect your own MongoDB if you want the data in your cluster.
Create a schema — for example
authorswith a name, a country and a year of birth; press Save & publish.Add a record — open the collection and press Add New.
Read it from code —
findwith the SDK, ornorbix api database findwith the CLI.
Use it from code
Every Do it from code block in the Database pages uses this client. Install @norbix.ai/ts (see SDK install) and set NORBIX_API_KEY to a project API key.
The CLI lines use the generic norbix hub … and norbix api … commands of @norbix.ai/cli (signed in with norbix login, project id in NORBIX_PROJECT_ID):
The Hub (
norbix.hub.database,norbix hub database …) manages the module: schemas, taxonomies, triggers, aggregates and integrations. It can also read and write records.The API (
norbix.api.database,norbix api database …) is what your app calls: records, terms and saved aggregates. It also accepts a signed-in end user's token.Every record call can name a
databaseIntegrationId; without it the default integration of the request's environment is used.
Related
Integrations concept · Triggers concept · SDK · CLI · API · What agents can do
Last updated
Was this helpful?