user1369975
user1369975

Reputation: 420

Referential Integrity constraint meaning

I was having a slight confusion regarding the meaning of referential integrity constraint:

Lets say I have two tables:

R1=(A,B,C)
R2=(D,E)

Then if I have C as a foreign key in R1 referring to R2.Lets say that the table R1 contains three records and attribute C refers to D(since D is primary key).So is it possible that the attribute D in table R2,apart from the records from attribute C in table R1 contains some other values as well?

Upvotes: 0

Views: 138

Answers (1)

Yes, that's common.

Imagine, for example, that R2 contains one row for each state in your country, and that R1 contains rows that represent sales. And imagine further that you've sold things in only two or three states.

Upvotes: 2

Related Questions