CouchDB Multiple-Choice Questions (MCQs)

Apache CouchDB is an open-source document-oriented NoSQL database that is implemented in the Erlang programming language. It uses multiple formats and protocols to store, transfer, and process its data.

CouchDB MCQs: This section contains multiple-choice questions and answers on the various topics of CouchDB. Practice these MCQs to test and enhance your skills on CouchDB.

List of CouchDB MCQs

1. CouchDB is an open-source ____ database.

  1. SQL
  2. MongoDB
  3. File
  4. NoSQL

Answer: D) NoSQL

Explanation:

CouchDB is an open-source NoSQL database.

Discuss this Question


2. CouchDB is developed by ____.

  1. Oracle Corporation
  2. Apache software foundation
  3. Linux
  4. Oracle Corporation

Answer: B) Apache software foundation

Explanation:

CouchDB is developed by the Apache software foundation.

Discuss this Question


3. Which programming is used to write CouchDB?

  1. C++
  2. COBOL
  3. Erlang
  4. Python

Answer: C) Erlang

Explanation:

CouchDB is written in Erlang programming language.

Discuss this Question


4. What are the main features of CouchDB?

  1. It has an HTTP-based REST API.
  2. It has the simple structure of HTTP resources and methods (GET, PUT, DELETE).
  3. Data is stored in the flexible document-based structure
  4. It provides easy-to-use replication
  5. All of the above

Answer: E) All of the above

Explanation:

The main features of CouchDB are:

  • It has an HTTP-based REST API.
  • It has the simple structure of HTTP resources and methods (GET, PUT, DELETE).
  • Data is stored in the flexible document-based structure
  • It provides easy-to-use replication
  • And, many more.

Discuss this Question


5. CouchDB follows the document-oriented model and data is presented in ____ format.

  1. JSON
  2. BSON
  3. XML
  4. None of the above

Answer: A) JSON

Explanation:

CouchDB follows the document-oriented model and data is presented in JSON format.

Discuss this Question


6. In CouchDB, the Couch is an acronym for ____.

  1. cluster of unreliable commodity hardware
  2. cluster of unreadable commodity hardware
  3. cluster of unreliable common hardware
  4. cluster of unreadable common hardware

Answer: A) cluster of unreliable commodity hardware

Explanation:

Couch is an acronym for "cluster of unreliable commodity hardware".

Discuss this Question


7. In CouchDB, database contains ____.

  1. Tables
  2. Collections
  3. Documents
  4. All of the above

Answer: C) Documents

Explanation:

In CouchDB, the database contains documents.

Discuss this Question


8. CouchDB supports the ____ replication with custom conflict resolution functions.

  1. master-master
  2. master-slave
  3. slave-slave
  4. None of the above

Answer: A) master-master

Explanation:

CouchDB supports master-master replication with custom conflict resolution functions.

Discuss this Question


9. CouchDB follows MVCC, what is the full form of MVCC?

  1. Multi-Version Collection Control
  2. Multi-Version Concurrency Control
  3. Multi-Valued Collection Control
  4. Multi-Values Concurrency Control

Answer: B) Multi-Version Concurrency Control

Explanation:

The full form of MVCC is "Multi-Version Concurrency Control".

Discuss this Question


10. CouchDB favors ____.

  1. accessibility
  2. visibility
  3. consistency
  4. availability

Answer: D) availability

Explanation:

CouchDB favors availability.

Discuss this Question


11. What is/are the way(s) to communicate with CouchDB?

  1. CouchDB cURL
  2. CouchDB Fauxton
  3. Both A and B
  4. Only A

Answer: C) Both A and B

Explanation:

There are two ways to communicate with CouchDB: CouchDB cURL and CouchDB Fauxton.

Discuss this Question


12. To add a database in CouchDB, we use the ____ command.

  1. COPY
  2. GET
  3. PUT
  4. CREATE

Answer: C) PUT

Explanation:

The PUT can be used to add a database in CouchDB.

Discuss this Question


13. What is the data type of the returned value in CouchDB?

  1. Hex String
  2. JSON String
  3. Hex Array
  4. JSON Array

Answer: B) JSON String

Explanation:

The datatype of the returned value in CouchDB is JSON String.

Discuss this Question


14. In CouchDB, which data structure is used to store the result of a view?

  1. Array
  2. Structure
  3. Graph
  4. B-Tree

Answer: D) B-Tree

Explanation:

The "B-Tree" data structure is used while storing the result of a view in CouchDB.

Discuss this Question


15. Which is the correct command that is used to create a CouchDB database using cURL utility?

  1. $ curl -X GET http://127.0.0.1:5984/database_name
  2. $ curl -X PUT http://127.0.0.1:5984/database_name
  3. $ curl -X PUT http://127.0.0.1:5984/document/database_name
  4. $ curl -X PUT http://127.0.0.1:5984/collection/database_name

Answer: B) $ curl -X PUT http://127.0.0.1:5984/database_name

Explanation:

The following command can be used to create a CouchDB database using cURL utility,

$ curl -X PUT http://127.0.0.1:5984/database_name

Discuss this Question


16. Which is the correct command used for listing out all the CouchDB databases using cURL utility?

  1. $ curl -X GET http://127.0.0.1:5984/_databases
  2. $ curl -X GET http://127.0.0.1:5984/_all_databases
  3. $ curl -X GET http://127.0.0.1:5984/_dbs
  4. $ curl -X GET http://127.0.0.1:5984/_all_dbs

Answer: D) $ curl -X GET http://127.0.0.1:5984/_all_dbs

Explanation:

The following command can be used for listing out all the CouchDB databases using cURL utility,

$ curl -X PUT http://127.0.0.1:5984/database_name

Discuss this Question


17. Which method is used to delete an existing CouchDB database using cURL utility?

  1. REMOVE
  2. DELETE
  3. DESTROY
  4. DEL

Answer: B) DELETE

Explanation:

The method DELETE is used to delete an existing CouchDB database using cURL utility.

Discuss this Question


18. Which is the correct command that is used to delete an existing CouchDB database using cURL utility?

  1. $ curl -X DELETE http://127.0.0.1:5984/database_name
  2. $ curl -X DELETE http://127.0.0.1:5984/_database_name
  3. $ curl -X DELETE http://127.0.0.1:5984/document/database_name
  4. $ curl -X DELETE http://127.0.0.1:5984/document/_database_name

Answer: A) $ curl -X DELETE http://127.0.0.1:5984/database_name

Explanation:

The following command can be used to delete an existing CouchDB database using cURL utility,

$ curl -X DELETE http://127.0.0.1:5984/database_name

Discuss this Question


19. In CouchDB, can Views update documents or databases?

  1. Yes
  2. No

Answer: B) No

Explanation:

No, in CouchDB the Views are read-only to databases and their documents.

Discuss this Question


20. What is the command request to access the server information using cURL utility?

  1. curl http://127.0.0.1:5984/_all_info
  2. curl http://127.0.0.1:5984/_server
  3. curl http://127.0.0.1:5984/_info
  4. curl http://127.0.0.1:5984/

Answer: D) curl http://127.0.0.1:5984/

Explanation:

The command request to access the server information using cURL utility is:

curl http://127.0.0.1:5984/

Discuss this Question


21. What is the command request to retrieve information about the 'student' database using cURL utility?

  1. curl http://127.0.0.1:5984/student
  2. curl http://127.0.0.1:5984/dbs/student
  3. curl http://127.0.0.1:5984/_student
  4. curl http://127.0.0.1:5984/dbs/_student

Answer: A) curl http://127.0.0.1:5984/student

Explanation:

The command request to retrieve information about the 'student' database using cURL utility is:

curl http://127.0.0.1:5984/student

Discuss this Question


22. What is the command request to create a document using cURL utility?

  1. curl -X PUT http://127.0.0.1:5984/database_name/document
  2. curl -X PUT http://127.0.0.1:5984/"id" -d ' { document} '
  3. curl -X PUT http://127.0.0.1:5984/database_name/"id" -d ' { document} '
  4. All of the above

Answer: C) curl -X PUT http://127.0.0.1:5984/database_name/"id" -d ' { document} '

Explanation:

The command request to create a document using cURL utility is:

curl -X PUT http://127.0.0.1:5984/database_name/"id" -d ' { document} '

Discuss this Question


23. Which view is used to get the list of all documents from a CouchDB database using cURL utility?

  1. _docs
  2. _all_documents
  3. _views_all_docs
  4. _all_docs

Answer: D) _all_docs

Explanation:

The _all_docs is an inbuilt view that is used to get the list of all documents from a CouchDB database using cURL utility.

Discuss this Question


24. In CouchDB, ____ communication protocol is used by the client to communicate with server.

  1. HTTP
  2. FTP
  3. LDAP
  4. All of them

Answer: A) HTTP

Explanation:

In CouchDB, the HTTP communication protocol is used by the client to communicate with the server.

Discuss this Question


25. In CouchDB, how many attachments can be attached to a document?

  1. 1024
  2. 65635
  3. 131271
  4. Unlimited

Answer: D) Unlimited

Explanation:

There can be an Unlimited (N ) number of attachments can be attached to a document.

Discuss this Question


26. Which is the correct URI to get the list of all available statistics in CouchDB?

  1. _state
  2. _stats
  3. _statics
  4. _statistics

Answer: B) _stats

Explanation:

_stats URI is used to get the list of all available statistics in CouchDB.

Discuss this Question


27. In CouchDB, which encoding scheme is used to encode the attachments with a document?

  1. URL Encoding
  2. HTML Encoding
  3. HEX Encoding
  4. Base64 Encoding

Answer: D) Base64 Encoding

Explanation:

The "Base64 Encoding" encoding scheme is used for encoding the attachments with a document in CouchDB.

Discuss this Question


28. While getting the list of all documents using the GET command, what is the basis of ordering the result in CouchDB?

  1. Document Data
  2. DocumentID
  3. DataBaseID
  4. _docs_IDs

Answer: B) DocumentID

Explanation:

Based on DocumentID (document id) the result is displayed.

Discuss this Question


29. In CouchDB, to restrict the number of documents to be returned, which query parameter is used?

  1. restrict
  2. fixed
  3. check
  4. limit

Answer: D) limit

Explanation:

The limit is the query parameter that can be used to restrict the number of documents to be returned.

Discuss this Question


30. Which is the correct meta field to store the document ID in CouchDB?

  1. _doc_id
  2. _docid
  3. _id
  4. _did

Answer: C) _id

Explanation:

The _id is used to store the document ID in CouchDB.

Discuss this Question


31. Which view is used for a JSON structure of all of the design documents in a given database?

  1. _all_docs
  2. _design_docs
  3. _all_design_docs
  4. _design_all_docs

Answer: B) _design_docs

Explanation:

The _design_docs is an inbuilt view that is used to get a JSON structure of all of the design documents in a given database.

Discuss this Question


32. Which view is used to find documents using a declarative JSON querying syntax?

  1. _find
  2. _find_all
  3. _find_docs
  4. _find_all_docs

Answer: A) _find

Explanation:

The _find is an inbuilt view that is used to find documents using a declarative JSON querying syntax.

Discuss this Question


33. How many implicit operators are there in CouchDB?

  1. 1
  2. 2
  3. 3
  4. 4

Answer: B) 2

Explanation:

There are 2 implicit operators in CouchDB.

Discuss this Question


34. Which are the implicit operators in CouchDB?

  1. Equality
  2. And
  3. Not And
  4. Logical
  5. Both A and B
  6. All of the above (A to D)

Answer: E) Both A and B

Explanation:

There are two implicit operators, they are:

  • Equality
  • And

Discuss this Question


35. All operators expect 'Equality' and 'And' are known as ____.

  1. Logical Operators
  2. JSON Operators
  3. Advanced Operators
  4. Explicit Operators

Answer: D) Explicit Operators

Explanation:

All operators expect 'Equality' and 'And' are known as "Explicit Operators".

Discuss this Question


36. Why combination operators are used in CouchDB?

  1. To combine more than one conditions
  2. To combine more than one logical statement
  3. To combine selectors
  4. Both A and B

Answer: C) To combine selectors

Explanation:

The combination operators are used for combining the selectors.

Discuss this Question


37. Which is not a combination operator in CouchDB?

  1. $add
  2. $and
  3. $or
  4. $not

Answer: A) $add

Explanation:

The $add is not a combination operator, rest of others are the combination operators in CouchDB.

Discuss this Question


38. Which combination operator matches if all the selectors in the array match in CouchDB?

  1. $add
  2. $and
  3. $or
  4. $not

Answer: B) $and

Explanation:

The $and operator matches if all the selectors in the array match in CouchDB.

Discuss this Question


39. Which is the correct command to create a new index on a database?

  1. POST /{db}/index
  2. POST /{db}/_db_index
  3. POST /{db}/_dbindex
  4. POST /{db}/_index

Answer: D) POST /{db}/_index

Explanation:

The correct command to create a new index on a database is:

POST /{db}/_index

Discuss this Question


40. ____ allow documents to be filtered at indexing time.

  1. General indexes
  2. Compile-time indexes
  3. Partial indexes
  4. Run-time indexes

Answer: C) Partial indexes

Explanation:

Partial indexes allow documents to be filtered at indexing time.

Discuss this Question


References:




Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.