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+4Buffer this pageDigg thisShare on Reddit0

Leave a Reply

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

Most Popular Posts

Two years blogiversary

Posted on 3 years ago

Bhumi

How To use Singleton Design Pattern in PHP

Posted on 5 years ago

Bhumi

PHP Variables, Operators and Data types

Posted on 8 months ago

Bhumi

Synchronous Up & down Slider with jQuery

Posted on 4 years ago

Bhumi

HTML5 Geolocation API with Example

Updated 17 years ago

Bhumi

Overview of Views in MySQL

Updated 17 years ago

Bhumi

What is Closure in JavaScript?

Updated 17 years ago

Bhumi

How to use JavaScript Promise API?

Updated 17 years ago

Bhumi

Type Hinting Callable Functions in PHP

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 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 3 years ago

Bhumi