Data modeling in Couchbase Server
Couchbase Server is a multi-model database that natively manipulates data in key-value form or in JSON documents. Unlike relational databases which require strict predefined schema with tables and columns, Couchbase Server requires no predefined schema.
With Couchbase Server, applications can define their schema at the application layer and freely evolve their schema with no added administrative action. Schema changes do not require scheduling downtime nor do they trigger long running, offline updates to existing data.
Couchbase Server supports both document and key-value data natively. Document-based data representation allows complex objects to be natively represented with full fidelity in Couchbase Server. Key-value representation can be mixed with document-centric design and is typically used to optimize access for extreme low latencies.
At a high level, a data modeling exercise is typically done in 2 phases:
Logical data modeling: This phase focuses on describing your entities, their attributes and relationships. Logical data modeling phase is independent of the underlying containers your database platform provides.
Physical data modeling: In this phase you take the logical design and apply the entities and relationships to the containers provided to you by the Couchbase Server platform. Based on the access patterns, performance requirements, and atomicity and consistency requirements, you can choose which type of containers to use to represent your logical data model.