Refactor the code around the storage engine.
Add Session.add_or_ignore()