What integrity constraints are specified on database schema? Why each is considered important?
Open in App
Solution
While key and entity constraints are specified on individual relation, the referential integrity constraint is specified between two or more relations. This constraint is specified to maintain consistency among the tuples of such relations.
Accordingly, a tuple in one relation that refers to another relation must refer to an existing tuple in that other relation. In referencing Accounts Type, Accounts relation uses its attribute Type, which acts as foreign key to reference the tuples of relation Accounts Type through its primary key Catld.
The value of Type cannot be null because of toal participation of Accounts in classify relationship.For example , there are two tables EMP (EMPNO, ENM, SAL, DPTNO (Foreign key) DEPT (DPTNO (Primary key), DNM, LOC) The foreign key DPTNO of EMP Table takes its value as a reference from DEPT TABLE DPTNO.