Adding foreign key support