Q. A key path is defined as

  • (A) A url that directs to the value
  • (B) A value that is similar to hash table
  • (C) A value that tells the database how to extract an object’s key from the object
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) A value that tells the database how to extract an object’s key from the object
Explanation: A key path is defined as a value that tells the database how to extract an object’s key from the object.

Q. How does IndexedDB provide atomicity?

  • (A) Grouping among the data
  • (B) Grouping within a transaction
  • (C) Grouping the data
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) Grouping within a transaction
Explanation: IndexedDB provides atomicity guarantees: queries and updates to the database are grouped within a transaction so that they all succeed together or all fail together and never leave the database in an undefined partially updated state.

Q. Which of the following is a feature of the IndexedDB API?

  • (A) Simplifies the transaction management
  • (B) Need not manage the transaction at all
  • (C) Enhances the storage
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) Simplifies the transaction management
Explanation: One of the convenient feature of the IndexedDB API is that it simplifies the transaction management.

Q. What is the alternate way to search in an IndexedDB API?

  • (A) Key
  • (B) Address
  • (C) Indexes
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) Indexes
Explanation: In addition to retrieving objects from an object store by their primary key value, you may want to be able to search based on the value of other properties in the object. In order to be able to do this, you can define any number of indexes on the object store.

Q. Which is the function used to look up an object?

  • (A) put()
  • (B) set()
  • (C) get()
  • (D) look()
πŸ’¬ Discuss
βœ… Correct Answer: (C) get()
Explanation: You look up an object by calling the get() method of the object store or store a new object by calling put().

Q. Which is the method to look up the objects for a range of keys?

  • (A) lookRange()
  • (B) openCursor()
  • (C) lookall()
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) openCursor()
Explanation: If you want to look up the objects for a range of keys, you create an IDBRange object and pass it to the openCursor() method of the object store.

Q. Which are the forms of client-side storage?

  • (A) Web Databases
  • (B) FileSystem API
  • (C) Offline Web Applications
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned
Explanation: The various forms of client-side storage are web databases, filesystem API, Offline web applications and cookies.

Q. Which is the storage that allows the caching of web pages and their associated resources?

  • (A) Web Databases
  • (B) FileSystem API
  • (C) Offline Web Applications
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) Offline Web Applications
Explanation: HTML5 defines an “Offline Web Applications” API that allows the caching of web pages and their associated resources (scripts, CSS files, images, and so on). This is client-side storage for web applications themselves rather than just their data, and it allows web apps to install themselves so that they are available even when there is no connection to the Internet.

Q. Which is the Microsoft’s own proprietary client-side storage?

  • (A) IE User Data
  • (B) Offline Web Applications
  • (C) Cookies
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) IE User Data
Explanation: Microsoft implements its own proprietary client-side storage mechanism, known as “userData,” in IE5 and later. userData enables the storage of medium amounts of string data and can be used as an alternative to Web Storage in versions of IE before IE8.

Q. Which object supports Filesystem API?

  • (A) Element
  • (B) File
  • (C) Window
  • (D) DOM
πŸ’¬ Discuss
βœ… Correct Answer: (B) File
Explanation: The File object allows user-selected files to be uploaded through an XMLHttpRequest.