foreign key

foreign key implementation (untested!)
singleton pattern: init() + getInstance()