Hi,
I am studying for an upcoming exam and came across this question and it has me puzzled.
Code:
State two conditions about the attributes Employees.deptNum and Departments.deptNum – that must be satisfied in order for an RDBMS to accept Employees.deptNum as a foreign-key.
Does the question mean two conditions of the
data entered or
conditions of the attribute like type, length etc..?
First Case:
Code:
Both attributes must be of the same type and both tables (Employees and Departments) must be in the same database.
Second Case:
Code:
The data entered must be either null or else match one of the values in Employees.deptNum to be accepted as a foreign key..
Im not really sure how to answer this tbh.
How would you guys answer this?
Thanks..