use sqlite_master to determine whether a table exists