Structuring Database for Accounting
Structuring Database for Accounting · CBSE / NCERT · Page 24
- 1 min read
Full lesson
Code . The values of debit and credit cannot be null because of total participation of vouchers in debit and credit relationship. Second , it references Employees (EmpId, Fname, Minit, Lname, Address, PhoneNo, SuperId). While referencing Employees , the Vouchers relation makes use of its other attributes Prep.By and Auth.By.
These attributes act as foreign keys to reference the tuples of relation Employees through its key attribute EmpId. The values of PrepBy and AuthBy cannot be null because of total participation of vouchers in PrepBy and Authby relationships. The referential integrity constraint stands violated in above example, if there is a debit or credit code in voucher relation, the tuple for which does not exist in Accounts relation. Similarly, referential integrity fails, if there exists a value corresponding to Auth.By or Prep.By attribute of vouchers, the tuple for which does not exist in employees relation.
14.9 Operations and Constraint Violations There are two categories of operations on relational model : updates and retrieval The three basic types of updates are as given below : (a) Insert : This operation is performed to add a new tuple in a relation. For
Still stuck on this lesson?
Get an AI answer grounded in your actual textbook — with the exact page reference.
Ask AI about this topic →