Home / Companies / Couchbase / Blog / Post Details
Content Deep Dive

Data modelling: manual secondary indexes

Blog post from Couchbase

Post Details
Company
Date Published
Author
Matthew Revell, Lead Developer Advocate, EMEA, Couchbase
Word Count
1,291
Company Posts That Month
13
Language
English
Hacker News Points
-
Post removed?
No
Summary

Couchbase Server is often described as a document database due to its effective handling of JSON documents, but when modeling data for Couchbase, considering it as a key-value store can be beneficial. The distinction between key-value and document stores primarily lies in data querying; key-value stores offer simplicity with a single index, ensuring fast, consistent access, whereas document stores provide multiple indexes for flexible querying at the cost of increased resource use. Couchbase supports both methods, allowing users to decide based on their needs. To manage user profiles effectively, especially when users change their email addresses, Couchbase can utilize atomic counters to create unique, stable keys and manual secondary indexes to maintain flexibility and speed. This approach allows for efficient data retrieval without significant performance drawbacks, although it requires additional application layer work. The potential for implementing various manual indexes, such as for Twitter handles or phone numbers, further enhances Couchbase's capability, demonstrating its adaptability in balancing speed, flexibility, and scalability.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.