vania-janet/multiturn-rag-retrieval-data huggingface dataset:
IBM Cloud® Databases for MongoDB docs 

MongoDB is a JSON document store with a rich query and aggregation framework.

 Developer tools 

[API & SDK reference](https://cloud.ibm.com/apidocs/cloud-databases-api/cloud-databases-api-v5introduction)[CLI reference](https://cloud.ibm.com/docs/databases-cli-plugin)[Terraform reference](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/database)

 Recommended content 

[Getting Started A brief tutorial to introduce using an IBM Cloud® Databases for MongoDB deployment.](https://cloud.ibm.com/docs/databases-for-mongodb?topic=databases-for-mongodb-getting-started)[Setting the Admin Password The IBM Cloud® Databases for MongoDB service is provisioned with a admin user. You must set the admin password before you use it to connect.](https://cloud.ibm.com/docs/databases-for-mongodb?topic=databases-for-mongodb-admin-password&interface=ui)[Getting Connection Strings To connect to IBM Cloud® Databases for MongoDB, you need some users and connection strings.](https://cloud.ibm.com/docs/databases-for-mongodb?topic=databases-for-mongodb-connection-strings&interface=ui)

 Learn more 

[IBM Developer<br><br>Visit IBM Developer for technical articles, code patterns, tutorials, and more.<br><br>![112-Developer-tools.svg](https://cloud.ibm.com/media/docs/images/homepage/112-Developer-tools.svg)](https://developer.ibm.com/depmodels/cloud/)[Architecture Center<br><br>Discover the architecture references available for this product.<br><br>!
It is accessed with an HTTP API and can therefore be accessed by any device on the internet that speaks HTTP: application code, web browser, IoT device, or mobile phone. IBM Cloudant is a highly available managed service able to continue to operate with multiple hardware failures.

That's the end of this part. The next part is called The Document.







 The Document video 

Learn about IBM Cloudant databases and documents work.



* The Document video script

Welcome to the Introduction to IBM Cloudant course, an 17-part video series that gives you an overview of the IBM Cloudant database-as-a-service.

This video is part 2 - The IBM Cloudant Document.

In the previous section, we saw that IBM Cloudant is a JSON document store. Let's find out what that means in practice and how that compares to other types of database.

Most databases store their data in collections that are called tables, where each unit of data is a row, each with identical, fixed columns. The schema of each table is predefined: a list of columns with their name, date type, value constraints, and relations to other tables carefully defined. Each new record forms a row in a table.

IBM Cloudant is different!

An IBM Cloudant service includes collections that are called databases (instead of tables) each of which contain any number of documents.

The example of this slide shows the same data that is expressed in a traditional tabular database and how the same data would be stored in IBM Cloudant as JSON documents.

So if you come from a relational database background: tables are "databases" in IBM Cloudant, and rows are "documents".

An IBM Cloudant document must be a JSON object, starting and ending with curly braces and containing a number of key-value attributes.

JSON objects must be less that 1 megabyte in size and contain any number of strings, numbers, booleans, arrays, and objects. The nesting of objects within objects can continue to any depth.

The keys that are used can be as brief or verbose as you like.

The following list includes some simple example documents that show how each data type is used.
Grouping related documents together in IBM Cloudant 

Traditionally, e-commerce systems are built with relational databases. These databases typically use a number of tables joined to record sales, customer details, purchased products, and delivery tracking information.

Relational databases offer high consistency, which means that application developers can build their applications to a database's strengths. This practice includes joins between collections, enumerations to record the state of an object, and database transactions to guarantee atomic operations.

IBM® Cloudant® for IBM Cloud® favors availability over consistency. It's a high-availability, fault-tolerant, distributed database that is eventually consistent. A distributed database means the customer's shopping service is always available and scalable enough to cope with many users who make purchases at the same time. With that in mind, your application can leverage IBM Cloudant's strengths and not treat it like a relational database.

This discussion outlines some of the factors that are involved in building an e-commerce system that takes advantage of IBM Cloudant's strengths. IBM Cloudant uses concepts that are applicable to many other domains, such as:



* Using multiple documents to represent the state of a purchase, rather than frequently updating a single document.
* Storing copies of related objects in order instead of joining to another collection.
* Creating views to collate documents by order_id to reflect the current state of a purchase.



For example, you might create a purchase document that includes details such as the items ordered, customer information, cost, and delivery information.

See the following example document that describes a purchase:

{
"_id": "023f7a21dbe8a4177a2816e4ad1ea27e",
"type": "purchase",
"order_id": "320afa89017426b994162ab004ce3383",
"basket": [
{
"product_id": "A56",
"title": "Adele - 25",
"category": "Audio CD",
"price": 8.33,
"tax": 0.2,
"quantity": 2
},
{
For example, in the URL /collections/5a525eb7-b175-3820-0000-017d00f0fcd1/activity, the collection ID is 5a525eb7-b175-3820-0000-017d00f0fcd1.)



* If the problem has to do with documents failing to load, provide the following information if known:



* What kind of documents are being uploaded (such as PDF, Json, CSV). Was optical character recognition (OCR) enabled for the collection?
* How were the documents loaded into the collection? (using the API, from the product UI, data source connector)
* Did you identify fields in the collection by using Smart Document Understanding? If so, what type of SDU model was applied to the collection (user-trained or pretrained)?
* What enrichments were applied to the collection?



* If the problem is related to a particular document (of a small set of documents), provide the document_id of the document, if known. You can share example documents if they might be helpful.
* If the problem is related to querying documents, describe the kind of query being used.









 IBM Cloud Pak for Data Contacting IBM Support for installed deployments 

Installed deployments are deployment that you provision on IBM Cloud Pak for Data.

You can get help by opening a case from IBM Support from [IBM Support](https://www.ibm.com/mysupport/s/topic/0TO50000000IYkUGAW/cloud-pak-for-data).

Be ready to share the following information with IBM Support:



 Account information 



* Account name or customer name.
* Business impact so IBM Support understands the urgency of the issue and can prioritize it.
* Case information for any related cases or a parent case.
* Software versions of both the Discovery service version and IBM Cloud Pak for Data version.
* Relevant details about configuration choices that were made during installation and deployment.







 Problem description 



* What outcome were you expecting and what happened?
* Message text that is displayed when the error occurs, especially the document ID, if specified.
Getting Started 

IBM Cloud® Databases for MongoDB allows developers to take advantage of the latest MongoDB features: rich JSON documents, powerful query language, multi-document transactions, and authentic APIs. The service also automates common database administration tasks like high availability, backups, encryption, and infrastructure planning.

To get started with IBM Cloud® Databases for MongoDB, you need to take advantage of MongoDB Compass, an interactive GUI tool for querying, optimizing, and analyzing your MongoDB data. The full-featured [Compass Edition](https://docs.mongodb.com/compass/master/available-compass-short-editions) provides basic tools for viewing your MongoDB databases.



 Step 1: Before you begin 



* You need an [IBM Cloud account](https://cloud.ibm.com/registration) and a Databases for MongoDB deployment. Give your deployment a memorable name that appears in your account's Resource List.
* Next, [set the Admin Password](https://cloud.ibm.com/docs/databases-for-mongodb?topic=databases-for-mongodb-admin-password) for your deployment.
* Then, download and install [MongoDB Compass](https://docs.mongodb.com/compass/master/install/) from MongoDB.
* If your deployment is not using public endpoints, take [these additional steps](https://cloud.ibm.com/docs/databases-for-mongodb?topic=databases-for-mongodb-service-endpointsprivate-endpoints) to configure private endpoint access.

MongoDB cannot support both [public and private endpoints simultaneously](https://cloud.ibm.com/docs/databases-for-mongodb?topic=databases-for-mongodb-service-endpoints&interface=uiprovisioning-service-endpoints). This cannot be changed after provisioning.
* [Getting a list of all databases in the account](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-get-a-list-of-all-databases-in-the-account)
* [Getting documents](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-get-documents)
* [Sending multiple queries to a database](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-send-multiple-queries-to-a-database)
* [Getting changes to documents in the database](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-get-changes)
* [Deleting a database](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-deleting-a-database)
* [How is data stored in IBM Cloudant?](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-how-is-data-stored-in-ibm-cloudant-)
* [Document versioning and MVCC](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-document-versioning-and-mvcc)
* [Database partitioning](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning)
* [Conflicts](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-conflicts)
* [CAP Theorem](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-cap-theorem)
* [Combining IBM Cloudant with other IBM services](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-combine-ibm-services)



* How documents work



* [Overview](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-documents)
[View docs](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=cloud-databases-key-protect) 
 [IBM Cloud Databases for EnterpriseDB](https://cloud.ibm.com/docs/databases-for-enterprisedb?topic=databases-for-enterprisedb-getting-started) IBM Cloud Databases for EnterpriseDB offers a single source for purchase, deployment and support of EDB Postgres Enterprise and Standard editions based on PostgreSQL. [View docs](https://cloud.ibm.com/docs/databases-for-enterprisedb?topic=cloud-databases-key-protect) 
 [IBM Cloud Databases for etcd](https://cloud.ibm.com/docs/databases-for-etcd) IBM Cloud Databases for etcd is a managed etcd service that is hosted in the IBM Cloud and integrated with other IBM Cloud services. [View docs](https://cloud.ibm.com/docs/databases-for-etcd?topic=cloud-databases-key-protect) 
 [IBM Cloud Databases for MongoDB](https://cloud.ibm.com/docs/databases-for-mongodb) IBM Cloud Databases for MongoDB is a managed MongoDB service that is hosted in the IBM Cloud and integrated with other IBM Cloud services. [View docs](https://cloud.ibm.com/docs/databases-for-mongodb?topic=cloud-databases-key-protect) 
 [Databases for MySQL](https://cloud.ibm.com/docs/databases-for-mysql) IBM Cloud Databases for MongoDB is a managed MySQL service that is hosted in the IBM Cloud and integrated with other IBM Cloud services. [View docs](https://cloud.ibm.com/docs/databases-for-mysql?topic=cloud-databases-key-protect)
Database overview 

IBM® Cloudant® for IBM Cloud® databases contain JSON objects. These JSON objects are called [documents](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-documentsdocuments).

All documents must be contained in a database. For more information, see [partitioned databases](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-databasespartitioned-databases-database).

The [Grouping related documents together in IBM Cloudant](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-grouping-related-documents-together-in-ibm-cloudantgrouping-related-documents-together-in-ibm-cloudant) guide provides an example of how documents for an e-commerce application might be used within an IBM Cloudant database.



 Partitioned databases 

IBM Cloudant supports two types of databases:



* Partitioned
* Nonpartitioned



A partitioned database offers significant query performance and cost advantages but requires you to specify a logical partitioning of your data. The partitioning is specified as part of each document's ID. A partitioned database provides both global and partition queries. Partition queries target queries at a single, given document partition, meaning they need to process less data to return results. Therefore, partition queries offer significant performance advantages, and also often provide cost advantages over global queries. Global queries target the entire database, which leads to extra complexity, slower performance, and increased cost, but offers results that draw from all data.

Alternatively, a nonpartitioned database might be created. This type of database can be less complex to work with since no partitioning scheme needs to be defined, but you can create only global secondary indexes.

IBM Cloudant strongly encourages you to use a partitioned database for best long-term database performance where the data model allows for logical partitioning of documents.

The partitioning type of a database is set at database creation time. When you create a database, use the partitioned query string parameter to set whether the database is partitioned. The default for partitioned is false, maintaining compatibility with an earlier version.
For more information, see [FileNet connector](https://cloud.ibm.com/docs/services/discovery-data?topic=discovery-data-collection-typesfilenet-connect).

New Swedish, Norwegian, and Danish language support
: Added basic support for Swedish, Norwegian (Bokmål and Nynorsk), and Danish. For more information, see [Language support](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-language-support).

Change to Advanced rules models enrichment
: The [Advanced rules models enrichment](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-domain-mladvanced-rules) is now GA.

New document preview for search results
: You can now view your search results in a document preview for the following source documents: PDF, Word, PowerPoint, Excel, and all image files. See [supported file types](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collectionssupportedfiletypes) for the list of image files. This view makes it easier for you to see search results as highlighted passages within the text of the original document, making the context clearer.

New proxy support for Web Crawl
: Support was added to the [Web Crawl connector](https://cloud.ibm.com/docs/services/discovery-data?topic=discovery-data-collection-typesconnectwebcrawl) for proxy support.

Change to empty aggregations parameter
: Running a query with an empty aggregations parameter returns zero aggregations in the response.

Change to Postgres support
: Support for connecting to Postgres 9.4 was removed because the vendor ended version support was ended by the vendor on 13 February 2020.

Fixed the following defects in the 2.1.2 release
: When installing Discovery for Cloud Pak for Data on OpenShift, the ranker-rest service might intermittently fail to startup, due to an incompatible jar in the classpath.
: When you upload documents to a collection with existing documents, a Documents uploaded!
[IBM Developer<br><br>Visit IBM Developer for technical articles, code patterns, tutorials, and more.<br><br>![112-Developer-tools.svg](https://cloud.ibm.com/media/docs/images/homepage/112-Developer-tools.svg)](https://developer.ibm.com/depmodels/cloud/)[Architecture Center<br><br>Discover the architecture references available for this product.<br><br>![190-Application-Platform.svg](https://cloud.ibm.com/media/docs/images/homepage/190-Application-Platform.svg)](https://www.ibm.com/cloud/architecture)[IBM Training<br><br>Build your skills with IBM Cloud training.<br><br>![83-Elements-of-the-cloud.svg](https://cloud.ibm.com/media/docs/images/homepage/83-Elements-of-the-cloud.svg)](https://www.ibm.com/training/cloud)[Community<br><br>Join the IBM Cloud community and collaborate with others.<br><br>![35-Connectivity.svg](https://cloud.ibm.com/media/docs/images/homepage/35-Connectivity.svg)](https://community.ibm.com/community/user/publiccloud/home)

 Latest updates 

[View more](https://cloud.ibm.com/docs/acme-test?topic=acme-test-release-notes)12 December 2022 | Point-in-time Recovery

IBM Cloud® Databases for MongoDB Enterprise Edition offers PITR using any timestamp greater than the earliest available recovery point.

19 October 2022 | Deploying and Connecting an IBM Cloud® Databases Instance Tutorial

This tutorial guides you through the process of deploying a Cloud Databases instance and connecting it to a web front end by creating a webpage that allows visitors to input a word and its definition. These values are then stored in a database running on Cloud Databases.
Database 

Crawl documents that are stored in a database that supports the Java Database Connectivity (JDBC) API.

IBM Cloud Pak for Data

IBM Cloud Pak for Data only

This information applies only to installed deployments.



 What documents are crawled 



* Each row in the database is crawled and added to the collection as one document. The columns are indexed as metadata.
* The crawler attempts to crawl and index content, such as BLOB/BINARY, that is stored in the database. File types that are supported by Discovery are indexed. For more information, see [Supported file types](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collectionssupportedfiletypes).
* When a source is recrawled, new documents are added, updated documents are modified to the current version, and deleted documents are deleted from the collection's index.
* All Discovery data source connectors are read-only. Regardless of the permissions that are granted to the crawl account, Discovery never writes, updates, or deletes any content in the original data source.







 Data source requirements 

In addition to the [data source requirements](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collection-typesrequirements) for all installed deployments, your database data source must meet the following requirements:



* Discovery supports the following data source versions:



* Data Virtualization on IBM Cloud Pak for Data 1.8.0, 1.8.3 which use Db2 11.5
* IBM Db2: 10.5, 11.1, 11.5
* Microsoft SQL Server: 2012, 2014, 2016, 2017
* Oracle Database: 12c, 18c, 19c
* PostgreSQL: 9.6, 10, 11



Support for Data Virtualization was added with IBM Cloud Pak for Data 4.5.x releases
* You must obtain any required service licenses for the data source that you want to connect to. For more information about licenses, contact the system administrator of the data source.







 Prerequisite step 



* Decide which database tables you want to crawl.
It has only a small provisioned capacity and a fixed storage size, but it's fine for testing the IBM Cloudant service.

IBM Cloudant is often referred to as a "schemaless" database - but we have to be careful how we define that term.

It's true to say that you don't need to define your schema (field names, types, constraints, and relationships) ahead of time in an IBM Cloudant database. You can simply write a JSON document of your own design to a database.

Developers like this flexibility because they can design their data in their code, turn it into JSON, and write it to the database.

It's still important to think about the shape of your data, especially in terms of how you are going to query and index it, as we see later.

Data design is still required, but strictly speaking that database doesn't need to know about your schema.

Let's say we want to create a database of US presidents. We can simply devise our "model" of the data in our app, turn it into JSON, and write it to the database. In this case, we are using a common CouchDB convention: the "type" field indicates the data type of the document.

If at a future date we decide we want to add more data to our "schema", we can simply write a new object to the database with no complaints from IBM Cloudant. We could decide to add the "address" object only to the following documents:



* Documents that are created from now on.
* Only documents that we have addresses for.



In other words, documents of the same type can have fields present or missing.

Your database's schema can evolve over time to match your application's needs. You don't (necessarily) need to tell the database about the schema change - write new documents in the new format.

We can even store multiple document "types" in the same database. In this case, people, books, and places reside in the same database. We know which is which because of the "type" field (this field is a convention and not something that means anything to IBM Cloudant).
IBM Cloud® Databases for MongoDB Enterprise Edition offers PITR using any timestamp greater than the earliest available recovery point.

19 October 2022 | Deploying and Connecting an IBM Cloud® Databases Instance Tutorial

This tutorial guides you through the process of deploying a Cloud Databases instance and connecting it to a web front end by creating a webpage that allows visitors to input a word and its definition. These values are then stored in a database running on Cloud Databases. You install the database infrastructure by using Terraform and your web application uses the popular Express framework. The application can then be run locally, or by using Docker.

11 October 2022 | Protecting IBM Cloud® Databases for MongoDB resources with context-based restrictions

Context-based restrictions (CBR) give account owners and administrators the ability to define and enforce access restrictions for IBM Cloud® resources based on the context of access requests. Access to Cloud Databases resources can be controlled with CBR and identity and access management (IAM) policies.
[Databases for etcd](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-cbr) IAM-enabled Yes databases-for-etcd 
 [Databases for MongoDB](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-cbr) IAM-enabled Yes databases-for-mongodb 
 [Databases for MySQL](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-cbr) IAM-enabled Yes databases-for-mysql 
 [Databases for PostgreSQL](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-cbr) IAM-enabled Yes databases-for-postgresql 
 [Databases for Redis](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-cbr) IAM-enabled Yes databases-for-redis 
 [Direct Link](https://cloud.ibm.com/docs/dl?topic=dl-cbr) IAM-enabled No directlink 
 [DNS Services](https://cloud.ibm.com/docs/dns-svcs?topic=dns-svcs-cbr) IAM-enabled No dns-svcs 
 [Event Notifications](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-access-control-cbr) IAM-enabled No event-notifications 
 [Event Streams](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-restrict_accessconfiguring_cbr) IAM-enabled No messagehub 
 [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-access-control-with-cbr) IAM-enabled No kms