0

I have question about a foreign key.

Primary key which is foreign key in an relationship is specified NOT NULL in some book's example. Why?

I was thinking that primary key couldn't take on value "null" in an relation. Hence if it is a foreign key in a relationship it couldn't take on value "null" de facto. Otherwise such modification violates key constraints since foreign key has to be one of the values contained in the table it points to in attribute which is primary key. Thank you very much.

0

1 Answer 1

1

A foreign key null means that there may not be an entry on the other side. In a master-detail relationship it means a detail can exist without a master.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.