Structuring Database for Accounting
Structuring Database for Accounting · CBSE / NCERT · Page 23
- 1 min read
Full lesson
that we cannot identify such tuples or identify these as alike. A failure to distinguish them means they are duplicates. (d) Referential integrity constraint : 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 CatId . The value of Type cannot be null because of total participation of Accounts in classify relationship. Similarly, consider another example in which the relation Vouchers 527 ( Vno, Sno , Vdate, Debit, Amount, Credit, Amount, , , Narration) references two other relations as shown in figure 14.19.
First it references, Accounts ( Code, Name, Type ) . In referencing Accounts, the Vouchers relation uses its attributes Debit and Credit, which act as Foreign Keys to reference the tuples of relation Accounts through its primary key,
Still stuck on this lesson?
Get an AI answer grounded in your actual textbook — with the exact page reference.
Ask AI about this topic →