Referential Integrity Rule in DBMS is based on Primary and Foreign Key. The Rule defines that a foreign key have a matching primary key. Reference from a table to another table should be valid.
Referential Integrity Rule example −
The rule states that the DEPT_ID in the Employee table has a matching valid DEPT_ID in the Department table.
To allow join, the referential integrity rule states that the Primary Key and Foreign Key have same data types.