EGODatabaseはスレッドセーフなSQLiteのラッパーです。
-(EGODatabase*)getDB{
    EGODatabase* database = [EGODatabase databaseWithPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/database.db"]];
    return database;
}
EGODatabase* database=[self getDB];
NSString*sql=[NSString stringWithFormat:@"create table if not exists '%@' (id int,gno int,type int,filename varchar);",tableName];
EGODatabaseResult*result= [database executeQuery:sql];
if (result.errorCode) {//failed
        
}else{//success
        
}

参考サイト
enormego/egodatabase · GitHub
https://github.com/enormego/egodatabase