SQLAlchemy integration

With the three methods above, I've considered changing the item_data table to have separate columns for index, item type, and item IDs, which would probably make them more understandable (vs. the regexp mangling I'm doing here), and indexing might make it perform better too. If making that change would make your life easier as part of this transition, feel free to do that.