title: Application is closed again i open my app it is again creating database
body: <p>I am using jquery mobile,SQlite database,Cordova</p>
  
  <p>Please help me out when my application is getting closed then again when I open my apllication even my database is created then also it is going to else part of my first.js file and again it create the database</p>
  
  <p>My JQuery Script :-</p>
  
  <p>I am Using Two script</p>
  
  <p>first.js</p>
  
  <pre><code>                    if(db){
                  // Database is going to update.
                  alert("Database exist");
                  userAuthentication();
              }else{
                  DB_Create();   
                  alert("database created"); 
                  userAuthentication();           
              }
  </code></pre>
  
  <p>second.js</p>
  
  <p>//global variable</p>
  
  <pre><code>var db;
  var short_Name = 'E_DB';
  var version = '1.0';
  var display_Name = 'E_DB';
  var max_Size = '65535';
  var flags = true;
  
  userAuthentication(){
      if(flags){
          flags=false;
          alert("hello");
      }else{
          alert("hi");
      }
      }
  DB_Create(){
      db = window.openDatabase(short_Name, version, display_Name, max_Size);
      db.transaction(function(transaction) {
          transaction.executeSql('DROP TABLE IF EXISTS Out'); 
          transaction.executeSql('CREATE TABLE IF NOT EXISTS Out(id INTEGER PRIMARY KEY AUTOINCREMENT)'); 
          });
  }
  </code></pre>