http://dblog.com.au/iphone-development-tutorials/iphone-sdk-tutorial-reading-data-from-a-sqlite-database/

Create temporary database first, use command line
cd Desktop

sqlite3 temporary_db_copy9d.db

CREATE TABLE call (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, ADDRESS TEXT, PERSON_NAME TEXT,DATE INTEGER, DURATION INTEGER, FLAGS INTEGER, ID INTEGER);

INSERT INTO call (ADDRESS, PERSON_NAME,DATE, DURATION, FLAGS, ID) VALUES ('900','', 1283507477, 10, 5, 15);
INSERT INTO call (ADDRESS, PERSON_NAME, DATE, DURATION, FLAGS, ID) VALUES ('900','', 1283508342, 20, 4, -1);


CREATE TABLE message (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, ADDRESS TEXT, PERSON_NAME TEXT, DATE INTEGER, TEXT TEXT, FLAGS INTEGER, REPLACE INTEGER, SVC_CENTER TEXT, GROUP_ID INTEGER, ASSOCIATION_ID INTEGER, HEIGHT INTEGER, UIFLAGS INTEGER, VERSION INTEGER, SUBJECT TEXT, COUNTRY TEXT, HEADERS BLOG, RECEIPIENTS BLOG, READ INTEGER);
INSERT INTO message (ADDRESS, PERSON_NAME, DATE, TEXT, FLAGS, REPLACE, SVC_CENTER, GROUP_ID, ASSOCIATION_ID, HEIGHT, UIFLAGS, VERSION, SUBJECT, COUNTRY, HEADERS, RECEIPIENTS, READ)
 VALUES ('+84906920358', +1283564375, 'Hahaha . I m at home.', '', 2, 0,'',128,0,0,4,0,'','VN','','',1);
  
CREATE TABLE GPS (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, DATE INTEGER,  LATITUDE INTEGER, LONGITUDE INTEGER ,  ALTITUDE INTEGER );
INSERT INTO GPS (ROWID, DATE, LATITUDE, LONGITUDE, ALTITUDE)
 VALUES (1, +1283564375,  51.332249  , 0.803531, 0.000000);

  
 