The correct answer is: B. It does not allow to enter a value in the foreign key field of a child table if that value exist in the primary key of the parent table.
Referential integrity is a set of rules that ensures that data in one table is consistent with data in another table. In MS Access, referential integrity is enforced by the primary key and foreign key constraints.
The primary key is a column or set of columns that uniquely identifies each row in a table. The foreign key is a column or set of columns in a table that refers to the primary key of another table.
When you create a foreign key constraint, you are essentially saying that the values in the foreign key column must exist in the primary key column of the parent table. This ensures that the data in the two tables is consistent.
For example, let’s say you have a table called Customers
and a table called Orders
. The Customers
table has a primary key called CustomerID
. The Orders
table has a foreign key called CustomerID
that refers to the CustomerID
column in the Customers
table.
If you try to add a new row to the Orders
table with a CustomerID
that does not exist in the Customers
table, Access will prevent you from doing so. This is because the foreign key constraint is preventing you from entering a value in the foreign key field that does not exist in the primary key of the parent table.
Referential integrity is important because it helps to ensure the accuracy and consistency of data in your database. By enforcing referential integrity, you can be confident that the data in your database is accurate and up-to-date.
Options A and C are incorrect because they allow you to enter a value in the foreign key field of a child table if that value does not exist in the primary key of the parent table. This would violate referential integrity and could result in inaccurate data in your database.
Option D is incorrect because it is not a valid option.