Skip to main content

Database

The top-level isolation boundary, typically one per customer, environment, or workspace. Data in one database is fully separated from every other.

Collection

A partition within a database, typically one per end-user, team, or agent. Omit it and HydraDB uses the database’s default collection. See Multi tenancy for how scoping affects writes and reads.

Deprecated aliases

database and collection were previously called tenant_id and sub_tenant_id. Wherever you meet an old name - a request field, a route, a webhook payload - it is a deprecated alias, and it keeps working.
One exception: in the indexing webhook payload, tenant_id and database do NOT carry the same value. database is the name you ingested into; tenant_id is an identifier for it. Everywhere else - request fields, routes, query parameters - they remain interchangeable. See Webhooks.
Prefer the canonical names in new integrations. See Multi tenancy for the full compatibility contract, and Webhooks for the delivery payload.