database.java: foreign keys working in table "contains"