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 Facebook1

Share on LinkedIn0Tweet about this on TwitterShare on Google+3Buffer this pageDigg thisShare on Reddit0

Leave a Reply

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

Most Popular Posts

How to use Mixins in LESS CSS?

Posted on 2 years ago

Bhumi

How to convert RGB to Hex color PHP?

Posted on 3 years ago

Bhumi

How to handle Exception in PHP5

Posted on 2 years ago

Bhumi

How to Use PHP CodeSniffer?

Updated 17 years ago

Bhumi

AWS Cloud Database Migration Service

Updated 17 years ago

Bhumi

How does CI/CD works on AWS?

Updated 17 years ago

Bhumi

Overview of Amazon Web Services (AWS)

Updated 17 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 1 year ago

Bhumi

The Reader’s Poll – August 2014

Posted on 2 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 2 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 2 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 3 years ago

Bhumi