Home »
MCQs
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 ____.
- Java-based object-oriented database
- Python-based object-oriented database
- 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 ____.
- Asynchronously
- Synchronously
Answer: A) Asynchronously
Explanation:
Operations performed using IndexedDB are done asynchronously.
Discuss this Question
3. IndexedDB is a ____ database.
- RDBMS
- Network database
- Hierarchical database
- NoSQL
Answer: D) NoSQL
Explanation:
IndexedDB is a NoSQL database.
Discuss this Question
4. Does IndexedDB use Structured Query Language?
- Yes
- 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?
- Build()
- New()
- Db()
- 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.
- Python
- Java
- JavaScript
- 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.
- deleteDatabase()
- Removedatabase()
- delDatabase()
- 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?
- IDBDatabase.end()
- IDBDatabase.close()
- 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.
- True
- 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.
- True
- False
Answer: B) False
Explanation:
A database may have multiple object stores.
Discuss this Question
11. IndexedDB's data is stored in ____.
- Object path
- Object stores
- 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?
- ObjectStore()
- openObjectStore()
- createObjectStore()
- 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.
- destroyObjectStore()
- delObjectStore()
- removeObjectStore()
- 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.
- True
- 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.
- All()
- Getall()
- 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.
- Active
- Inactive
- Committing
- 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 ____.
- Active
- Inactive
- Committing
- 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
- Yes
- 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.
- Active
- Inactive
- Committing
- 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.
- Rank
- ID
- Index
- 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?
- 5
- 4
- 2
- 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?
- 5
- 4
- 3
- 2
Answer: D) 2
Explanation:
Storage comes in two types:
Discuss this Question
23. Group limit of storage is also known as ____.
- Hard limit
- Core limit
- 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 ____.
- Hard limit
- Core limit
- 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?
- Yes
- No
Answer: A) Yes
Explanation:
IndexedDB allows you to persistently store data within a user's browser.
Discuss this Question