PouchDB Multiple-Choice Questions (MCQs)

PouchDB is an open-source JavaScript database inspired by Apache CouchDB that is designed to run well within the browser.

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

List of PouchDB MCQs

1. PouchDB is written in ____?

  1. PHP
  2. JavaScript
  3. C
  4. C++
  5. Python

Answer: B) JavaScript

Explanation:

PouchDB is written in JavaScript.

Discuss this Question


2. Which of the following format does PouchDB uses to store the data?

  1. Document-based
  2. Graph-based
  3. Column-based
  4. Key-value based

Answer: A) Document-based

Explanation:

PouchDB stores data in a document-based format.

Discuss this Question


3. Is PouchDB open-source?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, PouchDB is open-source.

Discuss this Question


4. While the application is offline with PouchDB, the data is saved locally in the browser using ____?

  1. WebSQL
  2. IndexedDB
  3. Both

Answer: C) Both

Explanation:

While the application is offline with PouchDB, the data is saved locally in the browser using WebSQL and IndexedDB.

Discuss this Question


5. You can create a database in PouchDB using the ____?

  1. PouchDB object
  2. PouchDB Tables
  3. PouchDB constructor
  4. PouchDB field

Answer: C) PouchDB constructor

Explanation:

You can create a database in PouchDB using the PouchDB constructor.

Discuss this Question


6. Which of the following method can get the basic information about the database?

  1. Info()
  2. Db_info()
  3. Information()
  4. databaseInfo()

Answer: A) Info()

Explanation:

info() method can get the basic information about the database.

Discuss this Question


7. Which of the following function may be used to delete a database in PouchDB?

  1. Db.delete()
  2. Db.remove()
  3. Db.del()
  4. Db.destroy()

Answer: D) Db.destroy()

Explanation:

PouchDB's db.destroy() function may be used to delete a database.

Discuss this Question


8. With the ____ function, you can create a document in PouchDB.

  1. db.put()
  2. db.create()
  3. db.new()

Answer: A) db.put()

Explanation:

With the db.put() function, you can create a document in PouchDB.

Discuss this Question


9. With the ____ function, you can create an array (batch) of documents in PouchDB.

  1. db.bulkarray()
  2. db.bulkDocs()
  3. db.arraybulk()

Answer: B) db.bulkDocs()

Explanation:

With the db.bulkDocs() function, you can create an array (batch) of documents in PouchDB.

Discuss this Question


10. Which of the following method synchronizes data between multiple databases, either locally or remotely, using two-way replication?

  1. Synchronization()
  2. Synchro()
  3. Sync()
  4. Async()

Answer: C) Sync()

Explanation:

Sync() method synchronizes data between multiple databases, either locally or remotely, using two-way replication.

Discuss this Question


11. Which of the following method adds an attachment to a database document?

  1. Putattachment()
  2. Getattachment()
  3. Attachment()

Answer: A) Putattachment()

Explanation:

Putattachment() method adds an attachment to a database document.

Discuss this Question


12. Which of the following method fetches an attachment from a database document?

  1. Putattachment()
  2. Getattachment()
  3. Attachment()

Answer: B) Getattachment()

Explanation:

Getattachment() method fetches an attachment from a database document.

Discuss this Question


13. ____-method allows you to listen in real-time for changes to the database and trigger events depending on those changes.

  1. Listen()
  2. Changes()
  3. Listenchanges()

Answer: B) Changes()

Explanation:

Changes() method allows you to listen in real-time for changes to the database and trigger events depending on those changes.

Discuss this Question


14. ____- function returns all documents from the database or a subset of documents based on arguments like startkey, endkey, limit, and so on.

  1. Getdocs()
  2. Bulkdocs()
  3. Alldocs()

Answer: C) Alldocs()

Explanation:

alldocs() function returns all documents from the database or a subset of documents based on arguments like startkey, endkey, limit, and so on.

Discuss this Question


15. Which of the following browsers does PouchDB supports?

  1. Chrome 30+
  2. Safari 5+
  3. Internet Explorer 10+
  4. Opera 21+
  5. All of the above

Answer: E) All of the above

Explanation:

Following databases PouchDB supports:

  • Chrome 30+
  • Safari 5+
  • Internet Explorer 10+
  • Opera 21+

Discuss this Question


16. The ____ function may be used to minimize the size of a database by deleting unneeded data.

  1. compact()
  2. Reduce()
  3. Min()
  4. Minimize()

Answer: A) compact()

Explanation:

The compact() function may be used to minimize the size of a database by deleting unneeded data.

Discuss this Question


17. PouchDB functions like an app when offline, storing data locally.

  1. True
  2. False

Answer: A) True

Explanation:

PouchDB functions like an app when offline, storing data locally.

Discuss this Question


18. _rev in PouchDB is known as ____?

  1. Revision
  2. Revolution
  3. Revision maker
  4. Revision marker

Answer: D) Revision marker

Explanation:

_rev is known as a revision marker.

Discuss this Question


19. With the ____ function, you may delete a document from a PouchDB database.

  1. db.remove()
  2. db.destroy()
  3. db.remove()
  4. db.delete()

Answer: A) db.remove()

Explanation:

With the db.remove() function, you may delete a document from a PouchDB database.

Discuss this Question


20. What are the alternatives to PouchDB?

  1. SQLlite
  2. Realm
  3. MongoDB
  4. All of the above

Answer: D) All of the above

Explanation:

Following are the alternatives to PouchDB:

  • SQLlite
  • Realm
  • MongoDB

Discuss this Question




Comments and Discussions!

Load comments ↻





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