Home »
MCQs
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.
- SQL
- MongoDB
- File
- NoSQL
Answer: D) NoSQL
Explanation:
CouchDB is an open-source NoSQL database.
Discuss this Question
2. CouchDB is developed by ____.
- Oracle Corporation
- Apache software foundation
- Linux
- 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?
- C++
- COBOL
- Erlang
- Python
Answer: C) Erlang
Explanation:
CouchDB is written in Erlang programming language.
Discuss this Question
4. What are the main features of CouchDB?
- 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
- 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.
- JSON
- BSON
- XML
- 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 ____.
- cluster of unreliable commodity hardware
- cluster of unreadable commodity hardware
- cluster of unreliable common hardware
- 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 ____.
- Tables
- Collections
- Documents
- 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.
- master-master
- master-slave
- slave-slave
- 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?
- Multi-Version Collection Control
- Multi-Version Concurrency Control
- Multi-Valued Collection Control
- 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 ____.
- accessibility
- visibility
- consistency
- availability
Answer: D) availability
Explanation:
CouchDB favors availability.
Discuss this Question
11. What is/are the way(s) to communicate with CouchDB?
- CouchDB cURL
- CouchDB Fauxton
- Both A and B
- 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.
- COPY
- GET
- PUT
- 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?
- Hex String
- JSON String
- Hex Array
- 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?
- Array
- Structure
- Graph
- 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?
- $ curl -X GET http://127.0.0.1:5984/database_name
- $ curl -X PUT http://127.0.0.1:5984/database_name
- $ curl -X PUT http://127.0.0.1:5984/document/database_name
- $ 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?
- $ curl -X GET http://127.0.0.1:5984/_databases
- $ curl -X GET http://127.0.0.1:5984/_all_databases
- $ curl -X GET http://127.0.0.1:5984/_dbs
- $ 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?
- REMOVE
- DELETE
- DESTROY
- 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?
- $ curl -X DELETE http://127.0.0.1:5984/database_name
- $ curl -X DELETE http://127.0.0.1:5984/_database_name
- $ curl -X DELETE http://127.0.0.1:5984/document/database_name
- $ 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?
- Yes
- 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?
- curl http://127.0.0.1:5984/_all_info
- curl http://127.0.0.1:5984/_server
- curl http://127.0.0.1:5984/_info
- 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?
- curl http://127.0.0.1:5984/student
- curl http://127.0.0.1:5984/dbs/student
- curl http://127.0.0.1:5984/_student
- 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?
- curl -X PUT http://127.0.0.1:5984/database_name/document
- curl -X PUT http://127.0.0.1:5984/"id" -d ' { document} '
- curl -X PUT http://127.0.0.1:5984/database_name/"id" -d ' { document} '
- 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?
- _docs
- _all_documents
- _views_all_docs
- _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.
- HTTP
- FTP
- LDAP
- 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?
- 1024
- 65635
- 131271
- 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?
- _state
- _stats
- _statics
- _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?
- URL Encoding
- HTML Encoding
- HEX Encoding
- 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?
- Document Data
- DocumentID
- DataBaseID
- _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?
- restrict
- fixed
- check
- 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?
- _doc_id
- _docid
- _id
- _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?
- _all_docs
- _design_docs
- _all_design_docs
- _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?
- _find
- _find_all
- _find_docs
- _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
- 2
- 3
- 4
Answer: B) 2
Explanation:
There are 2 implicit operators in CouchDB.
Discuss this Question
34. Which are the implicit operators in CouchDB?
- Equality
- And
- Not And
- Logical
- Both A and B
- All of the above (A to D)
Answer: E) Both A and B
Explanation:
There are two implicit operators, they are:
Discuss this Question
35. All operators expect 'Equality' and 'And' are known as ____.
- Logical Operators
- JSON Operators
- Advanced Operators
- 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?
- To combine more than one conditions
- To combine more than one logical statement
- To combine selectors
- 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?
- $add
- $and
- $or
- $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?
- $add
- $and
- $or
- $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?
- POST /{db}/index
- POST /{db}/_db_index
- POST /{db}/_dbindex
- 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.
- General indexes
- Compile-time indexes
- Partial indexes
- Run-time indexes
Answer: C) Partial indexes
Explanation:
Partial indexes allow documents to be filtered at indexing time.
Discuss this Question
References: