557). The Client-Side Databases are stored in the ____________
[A]The JavaScript code
[B] User’s computer
[C]Both JavaScript code and User’s computer
[D]In the server
Show Answer
Correct Answer: User’s computer
Notes:
Answer: b
Explanation: The actual client-side databases are stored on the user’s computer and are directly accessed by JavaScript code in the browser.
558). Which of the following use the Web SQL Database?
[A]Chrome
[B]Firefox
[C]IE
[D]Firefox & IE
Show Answer
Correct Answer: Chrome
Notes:
Answer: a
Explanation: Chrome, Safari, and Opera implemented the Web SQL Database API, but Firefox and IE have not, and likely never will.
559). Which of the following are objective database and not a relational database?
[A]Web SQL Database
[B] FileSystem API
[C]IndexedDB
[D] User data
Show Answer
Correct Answer: IndexedDB
Notes:
Answer: c
Explanation: IndexedDB is an object database, not a relational database, and it is much simpler than databases that support SQL queries. It is more powerful, efficient, and robust than the key/value storage provided by the Web Storage API, however.
560). In the IndexedDB database, database is defined as _____________
[A]A collection of objects
[B]A collection of named object stores
[C]Objects collection
[D]Data collection
Show Answer
Correct Answer: A collection of named object stores
Notes:
Answer: b
Explanation: In the IndexedDB API, a database is simply a collection of named object stores.
561). 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] A url that redirects
Show Answer
Correct Answer: A value that tells the database how to extract an object’s key from the object
Notes:
Answer: c
Explanation: A key path is defined as a value that tells the database how to extract an object’s key from the object.
562). How does IndexedDB provide atomicity?
[A]Grouping among the data
[B]Grouping within a transaction
[C]Grouping the data
[D]Interlinking data
Show Answer
Correct Answer: Grouping within a transaction
Notes:
Answer: b
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.
563). 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]Creates a link between data
Show Answer
Correct Answer: Simplifies the transaction management
Notes:
Answer: a
Explanation: One of the convenient feature of the IndexedDB API is that it simplifies the transaction management.
564). What is the alternate way to search in an IndexedDB API?
[A]Key
[B]Address
[C]Indexes
[D]Values
Show Answer
Correct Answer: Indexes
Notes:
Answer: c
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.
565). Which is the function used to look up an object?
[A]put()
[B]set()
[C]get()
[D] look()
Show Answer
Correct Answer: get()
Notes:
Answer: c
Explanation: You look up an object by calling the get() method of the object store or store a new object by calling put().
566). Which is the method to look up the objects for a range of keys?
[A]lookRange()
[B] openCursor()
[C] lookall()
[D] look()
Show Answer
Correct Answer: openCursor()
Notes:
Answer: b
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.