python 2.7 - insert data in sqlite3 when array could be of different lengths -


coming off nltk ner problem, have persons , organizations, need store in sqlite3 db. obtained wisdom need create separate tables hold these sets. how can create table when len(persons) vary each id. can zero. normal use of: insert table_name values (?),(t[0]) return fail.

thanks cl.'s comment, figured out best way think rows in two-column table, first column id int, , second column contains person_names. way, there no issue varying lengths of persons list. of course, link main table persons table, id field has reference (foreign keys) story_id (main table).


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -