Proper foreign keys in tables