For database

How can i create local database when i open the app for the first time and also execute sql dml operation. plz help me

there is also a plugin:
https://build.phonegap.com/plugins/731