1. The Client-Side Databases are stored in the ____________
b) User’s computer
d) In the server
2. Which of the following use the Web SQL Database?
d) Firefox & IE
Explanation: Chrome, Safari, and Opera implemented the Web SQL Database API, but Firefox and IE have not, and likely never will.
3. Which of the following are objective database and not a relational database?
a) Web SQL Database
b) FileSystem API
d) User data
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.
4. 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
Explanation: In the IndexedDB API, a database is simply a collection of named object stores.
5. 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
Explanation: A key path is defined as a value that tells the database how to extract an object’s key from the object.
6. How does IndexedDB provide atomicity?
a) Grouping among the data
b) Grouping within a transaction
c) Grouping the data
d) Interlinking data
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.
7. 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
Explanation: One of the convenient feature of the IndexedDB API is that it simplifies the transaction management.
8. What is the alternate way to search in an IndexedDB API?
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.
9. Which is the function used to look up an object?
Explanation: You look up an object by calling the get() method of the object store or store a new object by calling put().
10. Which is the method to look up the objects for a range of keys?
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.