Implements Issue #157- Add support for foreign key constraints