Extract method to handle the foreign key info for one table

Change-Id: Id7eefd511e4f070ce24fc4e27d54696a12ec1434