Back to Top

Learn about Object store and Index in HTML5 IndexedDB

html5 Object Store and index

In the first article of Indexed DB series, I told you all about the basics of IndexedDB in HTML5.In this tutorial, I will continue to introduce how to use IndexedDB,Object store, Index, Transactions in IndexedDB.

Let’s start with the Object store in IndexedDB

Object store in INDEXEDDB:

Now I learn how to store data and in IndexedDB have the concept called Object store.The object will be stored in the data with a keypath and an optional set of indexes. To create a new object that is stored in the existing database, you need an existing database for version control. To do this, first open the database you want version control. In addition to the database name, Open method also accepts a version number as the second argument. If you want to create a new version of the database, to create or modify a stored object or simply open the database with existing database with the higher version.

To create an Object store, you need to call the createObjectStore method, as shown in following line of code:

Creating an object store

html5_explain

Share:
Share on Facebook0Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

To get Last auto increment id in WordPress

Posted on 2 years ago

Bhumi

To grab content from nested tags in PHP

Posted on 4 years ago

Bhumi

How to enable Debug Console in X-cart?

Posted on 4 years ago

Bhumi

How to use PHP Method Chaining?

Posted on 2 years ago

Bhumi

Getting Started with LESS CSS

Posted on 2 years ago

Bhumi

Facade implementation in Laravel

Updated 3 weeks ago

Bhumi

MySQL coalesce() function

Updated 17 years ago

Bhumi

How to use JavaScript Promise API?

Updated 17 years ago

Bhumi

What are Lambdas and Closures in PHP?

Updated 17 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 3 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 4 years ago

Bhumi