In a referential integrity constraint with a foreign key, the value must be:

Prepare for success in your database systems exam with our comprehensive study tools. Use flashcards and multiple choice questions, with detailed hints and explanations. Ace your exam with confidence!

Multiple Choice

In a referential integrity constraint with a foreign key, the value must be:

Explanation:
Foreign keys enforce referential integrity by ensuring a value in the child table either references a valid row in the parent table or represents “no relationship” with NULL. The value must be either a value that exists in the parent’s primary key (or a referenced unique key) or be NULL if the column is allowed to be NULL. This is why the best choice is that the foreign key value matches an existing parent key or is NULL. If the foreign key is defined as NOT NULL, then NULL is not allowed, and the value must reference an existing parent key. The other options are incorrect because a foreign key does not have to be unique in the child and is not required to be non-null unless specified.

Foreign keys enforce referential integrity by ensuring a value in the child table either references a valid row in the parent table or represents “no relationship” with NULL. The value must be either a value that exists in the parent’s primary key (or a referenced unique key) or be NULL if the column is allowed to be NULL. This is why the best choice is that the foreign key value matches an existing parent key or is NULL. If the foreign key is defined as NOT NULL, then NULL is not allowed, and the value must reference an existing parent key. The other options are incorrect because a foreign key does not have to be unique in the child and is not required to be non-null unless specified.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy