(e) Referential integrity. Flashcards

1
Q

What is referential integrity?

A

A rule ensuring foreign keys match valid primary keys in another table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens if referential integrity is not maintained?

A

Orphan records can appear, breaking data consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an ‘orphan record’?

A

A record whose foreign key value references a non-existent primary key value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can referential integrity be enforced in SQL?

A

By declaring foreign key constraints (e.g., FOREIGN KEY REFERENCES).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly