Referencing to this gate ques- https://gateoverflow.in/16095/gate2004_13-let-and-two-relation-schema-where-the-primary-key
Let R1 (A, B, C) and R2 (D, E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1 referring to R2. Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r1 and r2.
how does projection C (r1) - projection D (r2) we will get empty relation?
For referential integrity to hold in a relational database, any column in a base table that is declared a foreign key can contain either a null value, or only values from a parent table's primary key or a candidate key.
So C can have null or duplicate values in foreign key, subtracting entities of D from C can still have null and other values(those were duplicate). So, how will it get empty set?