Take this example of a column definition:
permission_id int not null references ugp_permissions (id)
Is the not null
constraint redundant in this example? I think it is, since the provided value has to match on the referenced table. However, when there are null records on the referenced column, would that classify as a match for the foreign key?