+ issue #163: added foreign keys to the database model.