conn.executescript(script)
items = [line.split() for line in raw_items.strip().split('\n')]
conn.executemany('INSERT INTO news VALUES (?,?)', items)
cmd = 'SELECT COUNT(*) FROM news WHERE Term="Obama"'
print('Obama size: ', conn.execute(cmd).fetchone())
cmd = """
SELECT A.Article_id, A.Term, B.Term FROM news AS A 
JOIN news AS B ON A.Article_id = B.Article_id 
AND A.Term != B.Term """
for result in conn.execute(cmd).fetchall():
    pass
установление связи «многие ко многим» для миллионов терминов