Contentvalues and Hashtable are a kind of storage mechanism, but the biggest difference between the two is that contenvalues can only store basic types of data, such as String,int, which cannot store objects. Instead, Hashtable can store objects. Contentvalues stores the data in the form of (Key,value) when the object is stored.
When you forget to insert data into the database, you should first have a Contentvalues object so:
Contentvalues initial = new Contentvalues ();
Initial.put (key,values);
Sqlitedatabase DB;
Db.insert (database_name,null,initialvalues);
Insert success returns the ID of the record otherwise-1;
Example code: A simple Insert
Public long Insert (String text)
{
Sqlitedatabase db = This.getwritabledatabase ();
Contentvalues CV = new Contentvalues ();
Cv.put (Field_text, TEXT);
Long row = Db.insert (table_name, NULL, CV);
return row;
}