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 Facebook1Share 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

How to create Cron jobs in WordPress?

Posted on 4 years ago

Bhumi

How to use jQuery Cookie

Posted on 5 years ago

Bhumi

How to use Git init command

Posted on 5 months ago

Bhumi

How BlockChain and Ethereum works?

Updated 1 day ago

Bhumi

Facade implementation in Laravel

Updated 2 months ago

Bhumi

MySQL coalesce() function

Updated 18 years ago

Bhumi

How to use JavaScript Promise API?

Updated 18 years ago

Bhumi

What are Lambdas and Closures in PHP?

Updated 18 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