IndexedDB - An Efficient Way to Manage Data

Page 1

IndexedDB

An Efficient Way to Manage Data

By SPEC INDIA


What is IndexedDb A

web browser standard interface for a local database of records

 Holds

simple values and hierarchical objects

 An

API for client-side storage of significant amounts of structured data

 Exhibits

High performance

 Storage

and retrieval done through keys or indexes


The Object Store 

The IndexedDB is made of records called an Object Store

Each of the records consists of a key path and a corresponding value

Each Object Store can have a collection of Indexes for efficient Queries


Browser Integration  IE

10.0+

 Firefox

Mozilla 28.0+

 Chrome  Safari

33.0

8.0+

 Opera

22.0+


Features 

Full functionality even if a network connection is not available

No data loss on network interruption

Can cache data and restore state between invocations

Generates less network traffic

Data management happens on the local computer rather than over the Internet

Supports transactions and cursors

Allows faster indexing and searching of objects, enabling better data management

Supports both synchronous and asynchronous API


Comparison with the Alternatives IndexDB Stores large amount of structured data on Client Side Generates no additional traffic Stores large amount of structured data on Client Side Supports both Synchronous and Asynchronous APIs Does not use Structured Query Language (SQL) but uses queries on an index

Cookie • Extremely well supported • Have legal implications • Limited storage space • Results in additional traffic WebSQL • An API which stores data at client side. • Uses SQL queries to store data • W3C no longer maintains this specification. WebSQL is on way to exinction Local Storage • Limited in terms of the total amount of usable storage • Not a good solution when storing large number of complex objects • Designed for smaller data • Provides synchronous API


Database Features 

It is Object-oriented and not Relational Database

IndexedDB stores key-value pairs

The API is mostly asynchronous & does not have a return value

Works using Cursors based on indexes rather than SQL, to increase the speed

Prevents applications from accessing data with a different origin


Visit

http://www.spec-india.com/services/bi-bigdata-database-services.html

& Request a FREE POC to Test Drive our Services


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.