ADO.NET Provider for Couchbase

Build 23.0.8839

Data Model

Overview

Depending upon the connection settings being used, the provider can present several different mappings between Couchbase entities and relational tables and views. For more details on each of these capabilities, refer to the NoSQL portion of this documentation.

  • When connecting to the N1QL query service, the provider models Couchbase buckets as relational tables. In addition, if TypeDetectionScheme is set to DocType or Infer, the provider will present different document flavors in each bucket as their own tables.
  • When connecting to the Analytics service, the provider models Couchbase datasets as relational views.
  • When connecting with either service, the provider can expose arrays of data as child tables or views.

Please see the Automatic Schema Discovery section for more details on how flavor and child tables are exposed. In addition, the NewChildJoinsMode connection property is recommended for workflows that make heavy use of child tables. The documentation for that connection property details the improvements it makes to the provider data model.

Dataverses, Scopes and Collections

Couchbase has different ways of grouping buckets and datasets depending on the CouchbaseService and version of Couchbase you are connecting to:

  • Couchbase organizes Analytics datsets into groups called dataverses. By default the provider exposes datasets from all dataverses using compound names like Default.users as described in DataverseSeparator. It is important to remember that these compound names must be quoted when used in queries, for example SELECT * FROM [Default.users]
  • You may also set the Dataverse property to limit the the provider to exposing a single dataverse. This disables compound names so view names will not include the dataset.
  • When connecting to Couchbase 7 and above, the provider will use the scope, collection and bucket/dataset name to build table and view names. For example, a table with a name like crm.accounts.customers exposes the customers collection under the accounts scope of the crm bucket. These must be quoted the same as other compound names when used in queries, for example SELECT * FROM [crm.accounts.customers]

Live Metadata

All of the schemas provided by the provider are dynamically retrieved from Couchbase, so any changes in the buckets or fields within Couchbase will be reflected in the provider the next time you connect. You may also issue a reset query to refresh schemas without having to close the connection:

RESET SCHEMA CACHE

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839