insert documents into a db with autoincrementing keys