title: where do i insert values in sqlite android
body: <p>When I insert values in sqlite android, does it happens once or the database is created every time I run my application?</p>
  
  <p>Specifically I have categories that will populate a list (food, drinks ....etc).</p>
  
  <p>Where do I put my insert method?
  In my dbHelper class or the class that needs the data?</p>
  
  <pre><code>public class ShoppingCategories extends ListActivity{
    private AppSQLite mDbHelper;
    private Cursor mNotesCursor;
  
  @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      mDbHelper = new AppSQLite(this);
      insertShoppingCategories();
  }
  
  public void insertShoppingCategories(){
      mDbHelper.open();
      long id;
      id = mDbHelper.createShoppingCategory("food", 5, "@drawable/ic_launcher");
      id = mDbHelper.createShoppingCategory("drink", 3, "@drawable/ic_launcher");
  
      mDbHelper.close();
  }
  </code></pre>
  
  <p>and the createShoppingCategory from dbHelper class is:</p>
  
  <pre><code>   public long createShoppingCategory(String name, int priority, String icon) {
      ContentValues initialValues = new ContentValues();
      initialValues.put(KEY_NAME, name);
      initialValues.put(KEY_PRIORITY, priority);
      initialValues.put(KEY_ICON, icon);
  
      return mDb.insert(tShopCateg, null, initialValues);
  }
  </code></pre>