IndexedDB API
IndexedDB is a new concept or technology to store data in your web browser or even if you in offline mode then also they work.
Indexed DB is a low-level API for client-side storage to store a significant amount of data such as string, file/blobs. IndexedDB is a NoSQL, and large scale usable storage system, they give you the facility to store anything in the user web browser.
You cannot access or be accessed by any other origin data. In IndexedDB have a facility to create any amount of databases for the same origin in a web browser, But normally or suggestion is that to create only one/single database for a single application in the browser.
IndexedDB is store data in the form of an object. Yeah, it's similar to Mysql or any other databases system to create the first database in that database we create a table or object to store a number of data.
The object has a number of columns in the form of indexes in which we have to store values as per requirement.
All that indexes we created or any changes in the indexedDB database are work with the help of transaction.
Step to work with IndexedDB API:
First, we have to open an indexedDB API to open a database in the browser. this process is crucial because whenever we have to communicate with IndexedDB then first we have to open a database or create a database in a user web browser
After that we have to create a transaction and its very crucial part to do any changes in the database, if we have any error in a transaction then our operation is failed.
IndexedDB used to have a competing spec, WebSQL Database, but the W3C deprecated it on November 18, 2010. While both IndexedDB and WebSQL are solutions for storage, they do not offer the same functionalities. WebSQL Database is a relational database access system, whereas IndexedDB is an indexed table system.
If we create a transaction successfully then the next operation is to create an object store to store a data in that object store.
An object store is one kind of table in which we store the data or information. In object store creation we also have to give a "keyPath", So
If object store creation is completed then finally we have to create an index to store a final data in the browser.
This data is very useful when a user in off-line mode on internet connection, indexedDB is majorly playing a role on off-line mode to store a data or retrieve a data from a web browser(Desktop and mobile).
So, That's it here, and in this article, we learn that how IndexedDB actual work and its simple steps.
RESOURCES:
Indexed DB is a low-level API for client-side storage to store a significant amount of data such as string, file/blobs. IndexedDB is a NoSQL, and large scale usable storage system, they give you the facility to store anything in the user web browser.
You cannot access or be accessed by any other origin data. In IndexedDB have a facility to create any amount of databases for the same origin in a web browser, But normally or suggestion is that to create only one/single database for a single application in the browser.
IndexedDB is store data in the form of an object. Yeah, it's similar to Mysql or any other databases system to create the first database in that database we create a table or object to store a number of data.
The object has a number of columns in the form of indexes in which we have to store values as per requirement.
All that indexes we created or any changes in the indexedDB database are work with the help of transaction.
Step to work with IndexedDB API:
First, we have to open an indexedDB API to open a database in the browser. this process is crucial because whenever we have to communicate with IndexedDB then first we have to open a database or create a database in a user web browser
After that we have to create a transaction and its very crucial part to do any changes in the database, if we have any error in a transaction then our operation is failed.
IndexedDB used to have a competing spec, WebSQL Database, but the W3C deprecated it on November 18, 2010. While both IndexedDB and WebSQL are solutions for storage, they do not offer the same functionalities. WebSQL Database is a relational database access system, whereas IndexedDB is an indexed table system.
If we create a transaction successfully then the next operation is to create an object store to store a data in that object store.
An object store is one kind of table in which we store the data or information. In object store creation we also have to give a "keyPath", So
If object store creation is completed then finally we have to create an index to store a final data in the browser.
This data is very useful when a user in off-line mode on internet connection, indexedDB is majorly playing a role on off-line mode to store a data or retrieve a data from a web browser(Desktop and mobile).
So, That's it here, and in this article, we learn that how IndexedDB actual work and its simple steps.
RESOURCES:
Comments
Post a Comment