JavaScript IndexedDB MCQs (Multiple-Choice Questions)

The IndexedDB is also known as the Indexed Database API which is a JavaScript application programming interface. JavaScript IndexedDB is provided by web browsers to manage a NoSQL database of JSON objects.

JavaScript IndexedDB MCQs

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

List of JavaScript IndexedDB Multiple-choice Questions and Answers

1. IndexedDB is ____.

  1. Java-based object-oriented database
  2. Python-based object-oriented database
  3. JavaScript-based object-oriented database

Answer: C) JavaScript-based object-oriented database

Explanation:

IndexedDB is JavaScript-based object-oriented database.

Discuss this Question


2. Operations performed using IndexedDB are done ____.

  1. Asynchronously
  2. Synchronously

Answer: A) Asynchronously

Explanation:

Operations performed using IndexedDB are done asynchronously.

Discuss this Question


3. IndexedDB is a ____ database.

  1. RDBMS
  2. Network database
  3. Hierarchical database
  4. NoSQL

Answer: D) NoSQL

Explanation:

IndexedDB is a NoSQL database.

Discuss this Question


4. Does IndexedDB use Structured Query Language?

  1. Yes
  2. No

Answer: B) No

Explanation:

IndexedDB does not employ Structured Query Language Because IndexedDB is a NoSQL database, it does not employ SQL.

Discuss this Question


5. Which of the following method in IndexedDB can be employed to build a database?

  1. Build()
  2. New()
  3. Db()
  4. Open()

Answer: D) Open()

Explanation:

The open() method in IndexedDB can be employed to build a database.

Discuss this Question


6. We use ____ to connect with IndexedDB.

  1. Python
  2. Java
  3. JavaScript
  4. Go

Answer: C) JavaScript

Explanation:

We use JavaScript to connect with IndexedDB.

Discuss this Question


7. The ____ method can be used to remove a database.

  1. deleteDatabase()
  2. Removedatabase()
  3. delDatabase()
  4. erasedatabase()

Answer: A) deleteDatabase()

Explanation:

The deleteDatabase() method can be used to remove a database.

Discuss this Question


8. To close a database, we need to use which of the following function?

  1. IDBDatabase.end()
  2. IDBDatabase.close()
  3. IDBDatabase.finish()

Answer: B) IDBDatabase.close()

Explanation:

To close a database we need to use the function IDBDatabase.close()

Discuss this Question


9. The connection is not terminated until all transactions have been completed.

  1. True
  2. False

Answer: A) True

Explanation:

The connection is not terminated until all transactions have been completed.

Discuss this Question


10. A database may have a single object-store.

  1. True
  2. False

Answer: B) False

Explanation:

A database may have multiple object stores.

Discuss this Question


11. IndexedDB's data is stored in ____.

  1. Object path
  2. Object stores
  3. Object repository

Answer: B) Object stores

Explanation:

IndexedDB's data is stored in object stores.

Discuss this Question


12. Which of the following function can be employed to create an object store?

  1. ObjectStore()
  2. openObjectStore()
  3. createObjectStore()
  4. ObjectStoreCreate()

Answer: C) createObjectStore()

Explanation:

The createObjectStore() function can be employed to create an object store.

Discuss this Question


13. To destroy the object store, use the ____ method.

  1. destroyObjectStore()
  2. delObjectStore()
  3. removeObjectStore()
  4. deleteObjectStore()

Answer: D) deleteObjectStore()

Explanation:

To destroy the object store, use the deleteObjectStore() method.

Discuss this Question


14. We must open a transaction to conduct any operation in our database.

  1. True
  2. False

Answer: A) True

Explanation:

We must open a transaction to conduct any operation in our database.

Discuss this Question


15. The ____ method returns all the objects in the object store.

  1. All()
  2. Getall()
  3. Includeall()

Answer: B) Getall()

Explanation:

The getall() method returns all the objects in the object store.

Discuss this Question


16. When the transaction is in ____ state, new requests can be made against it.

  1. Active
  2. Inactive
  3. Committing
  4. Finished

Answer: A) Active

Explanation:

When the transaction is in an active state, new requests can be made against it.

Discuss this Question


17. Once all the requests associated with a transaction are completed then it attempts to ____.

  1. Active
  2. Inactive
  3. Committing
  4. Finished

Answer: C) Committing

Explanation:

Once all the requests associated with a transaction are completed then it attempts to commit.

Discuss this Question


18. During the commit state, new requests can be made? Yes or No

  1. Yes
  2. No

Answer: B) No

Explanation:

During the commit state, no new requests can be made.

Discuss this Question


19. After a transaction is committed or aborted then it is in the ____ state.

  1. Active
  2. Inactive
  3. Committing
  4. Finished

Answer: D) Finished

Explanation:

After a transaction is committed or aborted then it is in the finished state.

Discuss this Question


20. An ____ is a type of object store that is used to seek up entries in another object store known as the referenced object store.

  1. Rank
  2. ID
  3. Index
  4. Indicator

Answer: C) Index

Explanation:

An index is a type of object store that is used to seek up entries in another object store known as the referenced object store.

Discuss this Question


21. How many modes are there of transactions?

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

Answer: D) 3

Explanation:

The three modes of transactions are: readwrite, readonly, and versionchange.

Discuss this Question


22. Storage comes in how many types?

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

Answer: D) 2

Explanation:

Storage comes in two types:

  • Persistent
  • Temporary

Discuss this Question


23. Group limit of storage is also known as ____.

  1. Hard limit
  2. Core limit
  3. Soft limit

Answer: A) Hard limit

Explanation:

The group limit of storage is also known as the Hard limit.

Discuss this Question


24. Global limit of storage is also known as ____.

  1. Hard limit
  2. Core limit
  3. Soft limit

Answer: C) Soft limit

Explanation:

Global limit of storage is also known as a soft limit.

Discuss this Question


25. Does IndexedDB persistently stores your data?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

IndexedDB allows you to persistently store data within a user's browser.

Discuss this Question




Comments and Discussions!

Load comments ↻





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