Metadata for foreign key and generic references