Couchbase Developer key terms
Couchbase Developer · Get comfortable with the vocabulary.
- Document
- Related: Key-Value Access, Collection, N1QL
The basic unit of data in Couchbase, stored as JSON and identified by a unique key. Documents can hold nested objects and arrays, and are grouped into collections and scopes.
- Bucket
- Related: Collection, Scope, Memory Quota
A logical container for documents inside a Couchbase cluster, configured with memory quota, replication, and storage settings. Buckets isolate data for different applications or workloads and contain scopes and collections.
- Scope
- Related: Collection, Bucket
A namespace inside a bucket that groups related collections, similar to a database schema. Scopes allow multiple applications to share a bucket while keeping their collections logically separated.
- Collection
- Related: Scope, Document
A namespace within a scope that holds documents of a similar type, analogous to a table. Collections let you organize documents without creating separate buckets.
- Key-Value Access
- Related: Document, CAS Value, Upsert
The fastest way to read or write a document by its unique key, bypassing the query engine. SDKs expose get, insert, upsert, replace, and remove operations that map directly to the data service.
- N1QL
- Related: Index, Query Service, Document
Couchbase's SQL-like query language for JSON documents, supporting SELECT, INSERT, UPDATE, DELETE, joins, and nested document traversal. Queries run on the query service and can use indexes for efficiency.
- Index
- Related: N1QL, Index Service, Covering Index
A data structure maintained by the index service to speed up N1QL queries, typically a global secondary index. Indexes are defined on document fields and must be created before queries can use them efficiently.
- Covering Index
- Related: Index, N1QL
An index that contains all fields referenced by a query, allowing the query engine to answer without fetching the full document. Covering indexes reduce network and storage reads and improve query latency.
- CAS Value
- Related: Key-Value Access, Optimistic Locking
A checksum-like token returned with each document read, used for optimistic concurrency control. A write that supplies a stale CAS fails, preventing one client from overwriting another's recent change.
- Optimistic Locking
- Related: CAS Value, Pessimistic Locking
A concurrency strategy where a client reads a document's CAS, then submits a write conditioned on that CAS still being current. Conflicts are detected at write time rather than by holding locks.
- Pessimistic Locking
- Related: Optimistic Locking, CAS Value
A concurrency strategy where a client acquires an explicit lock on a document before modifying it, blocking other writers until the lock is released or expires. Couchbase exposes this through get-and-lock operations.
- Upsert
- Related: Insert, Replace, Key-Value Access
A key-value write that inserts a document if the key is absent or replaces it if present, without checking the existing CAS. It is convenient for idempotent writes but can overwrite concurrent updates.
- Insert
- Related: Upsert, Replace
A key-value write that fails if the key already exists, guaranteeing creation of a new document. It is used when duplicate creation must be prevented, such as registering a unique identifier.
- Replace
- Related: Upsert, Insert
A key-value write that overwrites an existing document and fails if the key is missing. It differs from upsert because it asserts the document already exists.
- Sub-Document API
- Related: Document, Key-Value Access, Mutation
An operation set that reads or modifies individual paths within a JSON document without transferring the whole document. It reduces network overhead for large documents and supports atomic multi-path mutations.
- Mutation
- Related: Durability, CAS Value
Any operation that changes stored data, such as insert, upsert, replace, or delete. Mutation results include a new CAS value and are replicated and persisted according to durability settings.
- Durability
- Related: Mutation, Replica, Persistence
The guarantee that a write has been persisted to disk and replicated to the configured number of nodes before being acknowledged. Couchbase lets clients request majority or custom durability levels per operation.
- Replica
- Related: Failover, Durability, vBucket
A copy of a document stored on a different node than the active copy, providing high availability if a node fails. Replica count is configured per bucket and affects failover behavior.
- vBucket
- Related: Rebalance, Replica, Cluster Map
A virtual bucket, one of 1024 hash partitions that map document keys to cluster nodes. vBuckets enable even data distribution and allow replicas and rebalancing to move data in units.
- Cluster Map
- Related: vBucket, Rebalance, SDK Client
The metadata that tells clients which node serves each vBucket and where replicas live. Clients refresh the cluster map when topology changes so requests continue to reach the right node.
- Rebalance
- Related: vBucket, Failover, Cluster Map
The process of redistributing vBuckets and data across nodes when nodes are added or removed. Rebalance keeps data evenly spread and restores replica counts after topology changes.
- Failover
- Related: Replica, Rebalance
Promoting replica data on surviving nodes when a node becomes unavailable, so the cluster keeps serving requests. Automatic failover can be configured with a timeout; graceful failover is used for planned maintenance.
- Memory Quota
- Related: Bucket, Ejection, Persistence
The amount of RAM assigned to a bucket or to cluster services, controlling how much data and metadata can be cached. When the quota is exceeded, items are ejected from memory and read from disk.
- Ejection
- Related: Memory Quota, Persistence
The eviction of document values from RAM when a bucket's memory quota is full, while keys and metadata may remain resident. Ejected documents are later fetched from disk, increasing read latency.
- Persistence
- Related: Durability, Ejection, Mutation
Writing mutations to disk so data survives a node restart. Couchbase acknowledges writes after memory update by default, so clients request durability when disk persistence must be confirmed.
- SDK Client
- Related: Connection String, Cluster Map, Key-Value Access
A language-specific library that connects applications to a Couchbase cluster, managing connections, authentication, retries, and the cluster map. Clients expose key-value, query, search, and analytics APIs.
- Connection String
- Related: SDK Client, Cluster Map
A URI such as couchbase://host1,host2 that tells an SDK which cluster nodes to contact and which options to apply. The client bootstraps from it and then follows the cluster map.
- Query Service
- Related: N1QL, Index Service, Prepared Statement
The cluster service that parses, plans, and executes N1QL queries, fetching documents from the data service or index service. It can be scaled independently and supports prepared statements.
- Index Service
- Related: Index, Query Service, Covering Index
The cluster service that stores and maintains global secondary indexes used by N1QL queries. Index nodes are separate from data nodes and should be sized for index memory and scan load.
- Prepared Statement
- Related: N1QL, Query Service, Parameterized Query
A N1QL query that has been parsed and planned once and cached on the query service, then executed repeatedly by name with parameters. It reduces planning overhead and avoids repeated query text transfer.
- Parameterized Query
- Related: Prepared Statement, N1QL
A N1QL statement that uses named or positional placeholders instead of literal values, with values supplied at execution. This prevents injection and lets the query service reuse plans.
- Scan Consistency
- Related: N1QL, Index, Mutation
A N1QL setting that controls whether a query sees the latest key-value mutations, such as not-bounded, request-plus, or at-plus. Higher consistency waits for index updates and increases latency.
- Full-Text Search
- Related: Index, N1QL
A cluster service that builds inverted indexes over text fields to support relevance-ranked, fuzzy, and faceted searches. Indexes are defined per bucket or scope and queried with a JSON search request.
- Analytics Service
- Related: N1QL, Collection
A service that runs parallel SQL++ queries over large datasets, including data external to Couchbase, without impacting operational workloads. It ingests data from collections into its own analytical store.
- Eventing Service
- Related: Mutation, Collection
A service that runs JavaScript functions triggered by document mutations, enabling reactive workflows and data enrichment. Functions define source collections, handlers, and timers, and run on eventing nodes.
- XDCR
- Related: Bucket, Replica, Durability
Cross Datacenter Replication, which asynchronously copies bucket data between clusters for disaster recovery, geo-distribution, or migration. Replications are configured per bucket and can filter documents.
- Sync Gateway
- Related: Replication, Channel, Sync Function
The server component in Couchbase Mobile that exposes a sync endpoint, enforces access control, and replicates documents between mobile clients and the cluster. It applies channels and sync functions to filter data.
- Couchbase Lite
- Related: Sync Gateway, Replication, Conflict Resolution
An embedded, offline-first JSON document database for mobile and edge applications. It stores data locally, supports queries, and synchronizes changes with Sync Gateway when connectivity is available.
- Channel
- Related: Sync Function, Sync Gateway, Replication
A named access-control label assigned to documents by a sync function, used to grant users access to subsets of data. Clients replicate only the channels their authenticated user is permitted to see.
- Sync Function
- Related: Channel, Sync Gateway, Access Grant
A JavaScript function in the Sync Gateway configuration that runs on each document write to validate content and assign channels and access grants. It shapes what data each user can read or write.
- Conflict Resolution
- Related: Replication, Couchbase Lite, Revision
The process of reconciling concurrent edits to the same document made on different replicas. Couchbase Mobile keeps revision trees and lets the application or a default policy choose the winning revision.