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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -