BACHELOR OF BUSINESS ADMINISTRATION

BUSINESS ADMINISTRATION

COMPUTER APPLICATION IN BUSINESS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Foreign key attribute can take NULL value
A
True
B
False
Explanation: 

Detailed explanation-1: -Short answer: Yes, it can be NULL or duplicate. I want to explain why a foreign key might need to be null or might need to be unique or not unique. First remember a Foreign key simply requires that the value in that field must exist first in a different table (the parent table).

Detailed explanation-2: -Foreign keys allow key values that are all NULL, even if there are no matching PRIMARY or UNIQUE keys.

Detailed explanation-3: -Yes. Foreign key can take Null . e.g in Emoloyee table we have employee id and manager id where manager id is foregin key and CEO of the organization doesn’t have manager so his manager id will be NULL in Employee table.

Detailed explanation-4: -A primary key cannot have null values. We can say that primary Keys are NOT NULL by nature. A primary key is UNIQUE. The primary key attribute cannot contain duplicate values (there cannot have two records having the same value of the primary key field).

There is 1 question to complete.