Handle multiple insertions to the memories table.