make database.py support items (almost)