title: insert data in table of sqlite database in background
body: <p>I need inserting data in table in background.I am using <code>NSTimer</code> for inserting data in table of sqlite database.But It freeze the application during the inserting process.I also used <code>NSThread</code> but It also create same problem. I am sharing code which I am using:</p>
  
  <pre><code>[NSTimer scheduledTimerWithTimeInterval:0.0 target:self selector:@selector(InsertDataInTable) userInfo:nil repeats:NO];
  
  -(void)InsertDataInTempTable
  {
          DatabaseManager *objDb=[[DatabaseManager alloc]init];
          [objDb setDelegate:self];
          for(int i=0;i&lt;[arrayTempTableData count];i++)
          {
              [objDb savedata:[dictCurrentUrlInfo objectForKey:TempTableName] elements:[arrayTempTableData objectAtIndex:i]];
          }
  }
  
  #pragma mark -
  #pragma mark Save Operation
  
  -(void)savedata:(NSString *)into elements:(NSMutableDictionary *)dictInsert{
          NSString *sql_String = @"";
          if([into isEqualToString:TABLEFirstAidTemp])
          {
              sql_String = [NSString stringWithFormat:@"INSERT INTO %@ VALUES('%@', '%@', '%@')", into,[dictInsert objectForKey:@"ArticleNumber"],[dictInsert objectForKey:@"ArticleTitle"],[dictInsert objectForKey:@"ArticleCategory"]];
          }
          sqlite3_exec(sql_Database1, [sql_String UTF8String], nil, nil, nil);
  }
  </code></pre>
  
  <p>Please provide me a proper solution to get rid of this problem.I want to perform inserting data in table in background. 
  Thanks in advance.</p>