Core Methods of Web SQL
The following are the 3 core methods of Web SQL that I will cover :
* openDatabase
* transaction
* executeSql
Creating and Opening Databases
Using the openDatabase method, you can create an object for the database. If the database doesn't exist then it will be created and an object for that database will be created. You also don't need to worry about closing the connection with the database.
To create and open the database, you need to use the following syntax.
var dbObj = OpenDatabase('[Database_Name]', '[Version_Number]', '[Text_Description]', '[size]', '[Creation_Callback]’)