Tech Off Post

Single Post Permalink

View Thread: Database keys
  • User profile image
    Matthew van Eerde

    Consider an Employees table with fields:

    EmployeeID <-- primary key
    EmailAddress <-- unique, NULLs allowed
    Office <-- unique, NULLs allowed

    > allowing nulls in a unique key and then using it in a foreign key is just weird. The child insert succeeds but you effectively orphan your child rows

    Not sure what you mean.