title: Android SQLite Database, WHY drop table and recreate on upgrade
body: <p>In the tutorials I am following and a lot of more places I see this,
  onUpgrade -> drop table if exists, then recreate table.</p>
  
  <p>What is the purpose of this?</p>
  
  <pre><code>private static class DbHelper extends SQLiteOpenHelper{
  
      public DbHelper(Context context) {
          super(context, DATABASE_NAME, null, DATABASE_VERSION);
      }
  
      @Override
      public void onCreate(SQLiteDatabase db) {
          db.execSQL("CREATE TABLE " + DATABASE_TABLE + " (" +
                  KEY_ROWID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
                  KEY_NAME + " TEXT NOT NULL, " +
                  KEY_HOTNESS + " TEXT NOT NULL);"
          );  
      }
  
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE);
          onCreate(db);
      }       
  }
  </code></pre>