Review the documents page on the web console and filter by collection names to confirm which one you’re using: There are several potent sub-document functions, but only a quick retrieval example is shown here using the lookup_in function. These cannot be accessed with the normal map functions but can be using the sub-document API instead. You can, of course, request the whole document and process it in your application but that would be unnecessarily inefficient.Ĭouchbase SDK provides a sub-document API for making single update/get requests for values at deeper levels.įor example, a user profile may have an address mapping with sub-items for street, city, and country. What do you do when you want to query for a specific sub-object in a deeper hierarchical JSON document? The map and list functions cannot extract from subitems in a single document call. You may want to use sets or queues for convenience in some cases, but you can always go back and use list or KV functions to add/remove and manage more directly with your code as needed. Data documents can be called directly their ID names after they are persisted and distributed to the cluster. For example, you can fetch a sub-component of the document, create a numbered item in a list, or add values to an ordered list. Queues – first-in-first-out access to list itemsĬouchbase manages its data as flexible JSON documents which can be exposed as atomic pieces of data through simple functions.Lists/collections – indexed and ordered lists of items.Counters – a single incrementing integer.Sub-documents – subsets of objects within a document.Documents – full JSON hierarchical document support. After authenticating the database connection, a simple get or set function should be all that is needed.Ī range of data structure functions provide access to these native programming objects: If all the software developer needs, for example, is a single item in a list. Interaction with full JSON documents is not required. Simplifying NoSQL application development Document databases, and other key-value databases, often support indexing of this data for query use cases. They are basic data management units for storing and retrieving data quickly and efficiently. What are data structures?Ĭouchbase Data Structures is an API feature that aligns the language of the database interface with a programming language.ĭata structures help simplify data models for NoSQL system developers. This article introduces Data Structures and how they work with Couchbase Server 7.0 Scopes and Collections features.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |